* x2apic mode vs. interrupt remapping
@ 2010-03-03 13:12 Jan Beulich
2010-03-03 13:32 ` Zhang, Xiantao
0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2010-03-03 13:12 UTC (permalink / raw)
To: Dexuan Cui; +Cc: xen-devel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: x2apic mode vs. interrupt remapping
2010-03-03 13:12 x2apic mode vs. interrupt remapping Jan Beulich
@ 2010-03-03 13:32 ` Zhang, Xiantao
2010-03-03 13:51 ` Jan Beulich
0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Xiantao @ 2010-03-03 13:32 UTC (permalink / raw)
To: Jan Beulich, Cui, Dexuan; +Cc: 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: x2apic mode vs. interrupt remapping
2010-03-03 13:32 ` Zhang, Xiantao
@ 2010-03-03 13:51 ` Jan Beulich
2010-03-03 14:09 ` Zhang, Xiantao
0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2010-03-03 13:51 UTC (permalink / raw)
To: Xiantao Zhang; +Cc: xen-devel, Dexuan Cui
>>> "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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: x2apic mode vs. interrupt remapping
2010-03-03 13:51 ` Jan Beulich
@ 2010-03-03 14:09 ` Zhang, Xiantao
2010-03-03 14:14 ` Jan Beulich
0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Xiantao @ 2010-03-03 14:09 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Cui, Dexuan
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: x2apic mode vs. interrupt remapping
2010-03-03 14:09 ` Zhang, Xiantao
@ 2010-03-03 14:14 ` Jan Beulich
2010-03-03 14:27 ` Zhang, Xiantao
0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2010-03-03 14:14 UTC (permalink / raw)
To: Xiantao Zhang; +Cc: xen-devel, Dexuan Cui
>>> "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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: x2apic mode vs. interrupt remapping
2010-03-03 14:14 ` Jan Beulich
@ 2010-03-03 14:27 ` Zhang, Xiantao
2010-03-04 4:15 ` Cui, Dexuan
0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Xiantao @ 2010-03-03 14:27 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Cui, Dexuan
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: x2apic mode vs. interrupt remapping
2010-03-03 14:27 ` Zhang, Xiantao
@ 2010-03-04 4:15 ` Cui, Dexuan
0 siblings, 0 replies; 7+ messages in thread
From: Cui, Dexuan @ 2010-03-04 4:15 UTC (permalink / raw)
To: Zhang, Xiantao, Jan Beulich; +Cc: 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. Xiantao
Oh, 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-03-04 4:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 13:12 x2apic mode vs. interrupt remapping Jan Beulich
2010-03-03 13:32 ` Zhang, Xiantao
2010-03-03 13:51 ` Jan Beulich
2010-03-03 14:09 ` Zhang, Xiantao
2010-03-03 14:14 ` Jan Beulich
2010-03-03 14:27 ` Zhang, Xiantao
2010-03-04 4:15 ` Cui, Dexuan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.