[libvirt] [Qemu-devel] [Question] why x2apic's set by default without host support(on Nehalem CPU).

Eduardo Habkost ehabkost at redhat.com
Mon Jul 22 13:41:38 UTC 2013


On Mon, Jul 22, 2013 at 07:24:24PM +0800, Peter Huang(Peng) wrote:
> Hi, Everyone
> 
> I have been encountered a problem recently.
> My box uses Nehalem E5520 CPU, and this model doesn't support x2apic feature.
> I created a VM on KVM, and uses cpu mode=pass-through, I can get the right cpu
> model from the VM, but I can also see that the CPU in the vm supports x2apic.
> 
> This seems werid.
> From QEMU's CPU model definition, Nehalem also doesn't support x2apic.
> 
> Can anyone explain it?
> 

libvirt's "host-passthrough" uses "-cpu host', and it "-cpu host"
enables every feature that can be enabled on the host. As KVM x2apic
emulation doesn't require host CPU support, it gets enabled.

If the behavior of "-cpu host" doesn't match libvirt expectations, we
need to clarify what are the requirements, and maybe have a "try to be
close to host CPU mode" as opposed to the current "enable everything
that can be enabled" mode.

-- 
Eduardo




More information about the libvir-list mailing list