How to enable x2apic in qemu

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
michael
Posts: 12
Joined: Fri Nov 12, 2021 1:09 am

How to enable x2apic in qemu

Post 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
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: How to enable x2apic in qemu

Post 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.
Post Reply