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 Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 Jan Beulich wrote:> 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 > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>>> "Zhang, Xiantao" <xiantao.zhang@intel.com> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 Jan Beulich wrote:>>>> "Zhang, Xiantao" <xiantao.zhang@intel.com> 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_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>>> "Zhang, Xiantao" <xiantao.zhang@intel.com> 03.03.10 15:09 >>> >When iommu_supports_eim is called in enable_x2apic, drhd is already >parsed in acpi_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?>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.Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich wrote:>>>> "Zhang, Xiantao" <xiantao.zhang@intel.com> 03.03.10 15:09 >>> >> When iommu_supports_eim is called in enable_x2apic, drhd is already >> parsed in acpi_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>> 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. > > Jan_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Zhang, Xiantao wrote:> Jan Beulich wrote: >>>>> "Zhang, Xiantao" <xiantao.zhang@intel.com> 03.03.10 15:09 >>> >>> When iommu_supports_eim is called in enable_x2apic, drhd is already >>> parsed in acpi_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. XiantaoOh, yes, I missed that! Thank you for pointing this out. I''ll make a patch for this soon. -- Dexuan>>> 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. >> >> Jan_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel