Page 1 of 1

How to enable x2apic in qemu

Posted: Sun Dec 12, 2021 2:24 pm
by michael
I'm now working on the initializing code of x2apic, but my qemu gives me this warning:
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]
When I want to check whether my emulator supports x2apic or not.

My work platform is on a virtual machine, so it does not support KVM. I'm now wondering do I have to switch to the physical machine to enable KVM and x2apic in order to use these features and continue my work

Here is my command to start qemu:
qemu-system-x86_64 -cpu qemu64,+x2apic -s -S -fda a.img

Re: How to enable x2apic in qemu

Posted: Sun Dec 12, 2021 6:14 pm
by Octocontrabass
Unfortunately, QEMU does not emulate x2apic. You have to use KVM (or a different emulator).

You might not need to switch to a physical machine. Some VMs support nested virtualization, which would allow you to use KVM inside your VM.