x2apic mode vs. interrupt remapping
Hi,
while the Linux kernel enters x2apic mode only when it was able to initialize interrupt remapping (leaving aside a KVM special case), Xen treats the two features as independent ones. We're having a report where interrupt delivery doesn't work in x2apic mode (i.e. no-x2apic makes the system boot successfully), and hence I'm wondering why Xen would use this mode on a wider range of machines than Linux.
Thanks, Jan
According to the #Cset20168, x2apic is only enabled when all VT-d engines support IR and EIM support, so the policy should be same with Linux's. Xiantao
Quoted 16 lines · Jan Beulich
Hi,
while the Linux kernel enters x2apic mode only when it was able to initialize interrupt remapping (leaving aside a KVM special case), Xen treats the two features as independent ones. We're having a report where interrupt delivery doesn't work in x2apic mode (i.e. no-x2apic makes the system boot successfully), and hence I'm wondering why Xen would use this mode on a wider range of machines than Linux.
Thanks, Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines
Quoted 1 line
Quoted 1 line
"Zhang, Xiantao" <[email protected]> 03.03.10 14:32 >>>
According to the #Cset20168, x2apic is only enabled when all VT-d engines support IR and EIM support, so the policy should be same with Linux's.
I would say that c/s has the intended behavior you describe, but since iommu_setup() runs after enable_x2apic(), the call to iommu_supports_eim() still returns true (iommu_enabled, iommu_qinval, and iommu_inremap all have an initial value of 1, and with no drhd present the function returns 1.
Jan
When iommu_supports_eim is called in enable_x2apic, drhd is already parsed in acpi_boot_init, so iommu_supports_eim should return hardware's real capability. That is to say, if eim is no supported on platform, x2apic shouldn't be enabled at all. Xiantao
Quoted 12 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line
"Zhang, Xiantao" <[email protected]> 03.03.10 14:32 >>>
According to the #Cset20168, x2apic is only enabled when all VT-d engines support IR and EIM support, so the policy should be same with Linux's.
I would say that c/s has the intended behavior you describe, but since
iommu_setup()runs afterenable_x2apic(), the call toiommu_supports_eim()still returns true (iommu_enabled,iommu_qinval, andiommu_inremapall have an initial value of 1, and with no drhd present the function returns 1.Jan
Quoted 3 lines
Quoted 1 line
Quoted 1 line
"Zhang, Xiantao" <[email protected]> 03.03.10 15:09 >>>
When
iommu_supports_eimis called inenable_x2apic, drhd is already parsed inacpi_boot_init,
Provided there is any - in the given case there is none. Perhaps the function should also return 0 if the list of drhd-s is empty?
Quoted 3 lines
so
iommu_supports_eimshould return hardware's real capability. That is to say, if eim is no supported on platform, x2apic shouldn't be enabled at all.
Jan
Quoted 6 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line
"Zhang, Xiantao" <[email protected]> 03.03.10 15:09 >>>
When
iommu_supports_eimis called inenable_x2apic, drhd is already parsed inacpi_boot_init,Provided there is any - in the given case there is none. Perhaps the function should also return 0 if the list of drhd-s is empty?
Yeah, if the drhd list is empty, it should return 0 instead of the default 1. The condition check maybe need enhancement. Xiantao
Quoted 5 lines
Quoted 3 lines
so
iommu_supports_eimshould return hardware's real capability. That is to say, if eim is no supported on platform, x2apic shouldn't be enabled at all.Jan
Quoted 10 lines · Xiantao
Quoted 6 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line
"Zhang, Xiantao" <[email protected]> 03.03.10 15:09 >>>
When
iommu_supports_eimis called inenable_x2apic, drhd is already parsed inacpi_boot_init,Provided there is any - in the given case there is none. Perhaps the function should also return 0 if the list of drhd-s is empty?
Yeah, if the drhd list is empty, it should return 0 instead of the default 1. The condition check maybe need enhancement. Xiantao
Oh, yes, I missed that!
Thank you for pointing this out.
I'll make a patch for this soon.
-- Dexuan
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
so
iommu_supports_eimshould return hardware's real capability. That is to say, if eim is no supported on platform, x2apic shouldn't be enabled at all.Jan