Re: [PATCH 2/2] xen: HVM X2APIC support

Stefano Stabellini
2010-12-07T10:23:45Z

On Tue, 7 Dec 2010, Sheng Yang wrote:
> +bool xen_hvm_need_lapic(void)
> +{
> + if (xen_pv_domain())
> + return false;
> + if (xen_hvm_domain() &&
> + (xen_feature(XENFEAT_hvm_pirqs) || xen_have_vector_callback))
> + return false;
> + return (xen_cpuid_base() != 0);
> +}
> +EXPORT_SYMBOL_GPL(xen_hvm_need_lapic);
> +

Why do you want to disable x2apic
if (xen_have_vector_callback && !xen_feature(XENFEAT_hvm_pirqs))?
In this case some emulated devices are still used, like the serial, and
need interrupt delivery using an apic. Same is true for all the
pci devices assigned to the VM.
The only case in which the apic is basically left unused is
(xen_feature(XENFEAT_hvm_pirqs) && xen_have_vector_callback).