Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895576 - [6.2.0 kernel] app-emulation/qemu-7.2.0-r2 - "System Management Mode not supported by this hypervisor" error when trying to start an Arch Linux guest VM
Summary: [6.2.0 kernel] app-emulation/qemu-7.2.0-r2 - "System Management Mode not supp...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Virtualization Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-20 17:50 UTC by squatted_posture785
Modified: 2023-02-21 11:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge --info.log,16.05 KB, text/x-log)
2023-02-20 17:50 UTC, squatted_posture785
Details
Arch Linux VM properties (vm_properties.xml,7.60 KB, text/xml)
2023-02-20 17:51 UTC, squatted_posture785
Details

Note You need to log in before you can comment on or make changes to this bug.
Description squatted_posture785 2023-02-20 17:50:35 UTC
I've compiled sys-kernel/gentoo-sources-6.2.0 today. I'm now getting the following error when trying to start an Arch Linux guest on Virt Manager:

Error starting domain: internal error: qemu unexpectedly closed the monitor: 2023-02-20T17:18:30.520219Z qemu-system-x86_64: System Management Mode not supported by this hypervisor.

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1402, in startup
    self._backend.create()
  File "/usr/lib/python3.10/site-packages/libvirt.py", line 1373, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2023-02-20T17:18:30.520219Z qemu-system-x86_64: System Management Mode not supported by this hypervisor.


I also have a Windows 10 guest VM which starts just fine. I don't have the issue described above if booted with kernel 6.1.12.

Reproducible: Always

Steps to Reproduce:
1. Boot from 6.2.0 kernel
2. Try to start an existing Arch Linux guest VM
Actual Results:  
The error mentioned appear and the VM doesn't start

Expected Results:  
The error mentioned doesn't appear and the VM starts normally
Comment 1 squatted_posture785 2023-02-20 17:50:57 UTC
Created attachment 853338 [details]
emerge --info
Comment 2 squatted_posture785 2023-02-20 17:51:11 UTC
Created attachment 853340 [details]
Arch Linux VM properties
Comment 3 squatted_posture785 2023-02-21 10:23:41 UTC
Updating to sys-kernel/linux-headers-6.2 didn't make any difference.

On the same host machine using Arch Linux, I updated to 6.2.arch1-1 kernel and the guest VM works just fine.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-21 10:28:14 UTC
(In reply to ut2s7kol87 from comment #0)
> libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor:
> 2023-02-20T17:18:30.520219Z qemu-system-x86_64: System Management Mode not
> supported by this hypervisor.
> 
> 

It's dying in https://github.com/qemu/qemu/blob/v7.2.0/hw/i386/x86.c#L1238.

We don't build with TCG right now in Gentoo because of the number of bugs with it (although maybe we should revisit that). I assume your kernel definitely supports KVM.

> I don't have the issue described above if booted with kernel 6.1.12.

Oh, I missed this bit. Let me see what Arch does with their kernel.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-21 10:28:29 UTC
I assume you're using equivalent kernel configs on both? gentoo-sources could obviously be any configuration you like.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-21 10:29:22 UTC
Arch doesn't seem to have any patches for their kernel so this sounds entirely in the config diff.
Comment 7 squatted_posture785 2023-02-21 11:10:37 UTC
(In reply to Sam James from comment #5)
> I assume you're using equivalent kernel configs on both? gentoo-sources
> could obviously be any configuration you like.

Yes, apart from the new 6.2 options of course.

(In reply to Sam James from comment #6)
> Arch doesn't seem to have any patches for their kernel so this sounds
> entirely in the config diff.


OK, thanks. I'll try compiling sys-kernel/gentoo-sources-6.2.0 kernel with my config file from 6.1.12 one more time. I'll pay more attention to the new options when running make oldconfig this time around.
Comment 8 squatted_posture785 2023-02-21 11:59:15 UTC
Indeed, I missed enabling CONFIG_KVM_SMM:

Virtualization (VIRTUALIZATION) [Y/n/?] y
  Kernel-based Virtual Machine (KVM) support (KVM) [Y/n/m/?] y
    KVM for Intel (and compatible) processors support (KVM_INTEL) [M/n/y/?] m
      Software Guard eXtensions (SGX) Virtualization (X86_SGX_KVM) [N/y/?] n
    KVM for AMD processors support (KVM_AMD) [N/m/y/?] n
    System Management Mode emulation (KVM_SMM) [Y/n/?] (NEW) y


All good now after recompiling a 6.2.0 kernel with this option enabled.

Sorry for the false report.