* [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER
@ 2023-10-24 10:26 Roger Pau Monne
2023-10-30 14:12 ` Jan Beulich
2023-10-30 14:13 ` Jan Beulich
0 siblings, 2 replies; 5+ messages in thread
From: Roger Pau Monne @ 2023-10-24 10:26 UTC (permalink / raw)
To: xen-devel; +Cc: Roger Pau Monne, Jan Beulich, Andrew Cooper, Wei Liu
The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is
Logical mode APIC must be configured for Cluster destination model. However in
apic_x2apic_probe() such flag is incorrectly used to gate whether Physical mode
can be used.
Since Xen when in x2APIC mode only uses Logical mode together with Cluster
model completely remove checking for ACPI_FADT_APIC_CLUSTER, as Xen always
fulfills the requirement signaled by the flag.
Fixes: eb40ae41b658 ('x86/Kconfig: add option for default x2APIC destination mode')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
xen/arch/x86/genapic/x2apic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c
index ca1db27157e2..707deef98c27 100644
--- a/xen/arch/x86/genapic/x2apic.c
+++ b/xen/arch/x86/genapic/x2apic.c
@@ -231,8 +231,7 @@ const struct genapic *__init apic_x2apic_probe(void)
*/
x2apic_phys = iommu_intremap != iommu_intremap_full ||
(acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) ||
- (IS_ENABLED(CONFIG_X2APIC_PHYSICAL) &&
- !(acpi_gbl_FADT.flags & ACPI_FADT_APIC_CLUSTER));
+ IS_ENABLED(CONFIG_X2APIC_PHYSICAL);
}
else if ( !x2apic_phys )
switch ( iommu_intremap )
--
2.42.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER
2023-10-24 10:26 [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER Roger Pau Monne
@ 2023-10-30 14:12 ` Jan Beulich
2023-10-30 14:13 ` Jan Beulich
1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2023-10-30 14:12 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: Andrew Cooper, Wei Liu, xen-devel
On 24.10.2023 12:26, Roger Pau Monne wrote:
> The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is
> Logical mode APIC must be configured for Cluster destination model. However in
> apic_x2apic_probe() such flag is incorrectly used to gate whether Physical mode
> can be used.
>
> Since Xen when in x2APIC mode only uses Logical mode together with Cluster
> model completely remove checking for ACPI_FADT_APIC_CLUSTER, as Xen always
> fulfills the requirement signaled by the flag.
>
> Fixes: eb40ae41b658 ('x86/Kconfig: add option for default x2APIC destination mode')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER
2023-10-24 10:26 [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER Roger Pau Monne
2023-10-30 14:12 ` Jan Beulich
@ 2023-10-30 14:13 ` Jan Beulich
2023-10-30 16:19 ` Roger Pau Monné
1 sibling, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2023-10-30 14:13 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: Andrew Cooper, Wei Liu, xen-devel
On 24.10.2023 12:26, Roger Pau Monne wrote:
> The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is
> Logical mode APIC must be configured for Cluster destination model. However in
> apic_x2apic_probe() such flag is incorrectly used to gate whether Physical mode
> can be used.
>
> Since Xen when in x2APIC mode only uses Logical mode together with Cluster
> model completely remove checking for ACPI_FADT_APIC_CLUSTER, as Xen always
> fulfills the requirement signaled by the flag.
Actually, one remark: The text in the 6.5 spec really only mentions xAPIC
mode, so it's not entirely clear whether the two flags actually have any
meaning for x2APIC mode.
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER
2023-10-30 14:13 ` Jan Beulich
@ 2023-10-30 16:19 ` Roger Pau Monné
2023-10-30 16:32 ` Jan Beulich
0 siblings, 1 reply; 5+ messages in thread
From: Roger Pau Monné @ 2023-10-30 16:19 UTC (permalink / raw)
To: Jan Beulich; +Cc: Andrew Cooper, Wei Liu, xen-devel
On Mon, Oct 30, 2023 at 03:13:50PM +0100, Jan Beulich wrote:
> On 24.10.2023 12:26, Roger Pau Monne wrote:
> > The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is
> > Logical mode APIC must be configured for Cluster destination model. However in
> > apic_x2apic_probe() such flag is incorrectly used to gate whether Physical mode
> > can be used.
> >
> > Since Xen when in x2APIC mode only uses Logical mode together with Cluster
> > model completely remove checking for ACPI_FADT_APIC_CLUSTER, as Xen always
> > fulfills the requirement signaled by the flag.
>
> Actually, one remark: The text in the 6.5 spec really only mentions xAPIC
> mode, so it's not entirely clear whether the two flags actually have any
> meaning for x2APIC mode.
Hm, indeed. That wants to be in a different fix however.
Thanks, Roger.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER
2023-10-30 16:19 ` Roger Pau Monné
@ 2023-10-30 16:32 ` Jan Beulich
0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2023-10-30 16:32 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: Andrew Cooper, Wei Liu, xen-devel
On 30.10.2023 17:19, Roger Pau Monné wrote:
> On Mon, Oct 30, 2023 at 03:13:50PM +0100, Jan Beulich wrote:
>> On 24.10.2023 12:26, Roger Pau Monne wrote:
>>> The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is
>>> Logical mode APIC must be configured for Cluster destination model. However in
>>> apic_x2apic_probe() such flag is incorrectly used to gate whether Physical mode
>>> can be used.
>>>
>>> Since Xen when in x2APIC mode only uses Logical mode together with Cluster
>>> model completely remove checking for ACPI_FADT_APIC_CLUSTER, as Xen always
>>> fulfills the requirement signaled by the flag.
>>
>> Actually, one remark: The text in the 6.5 spec really only mentions xAPIC
>> mode, so it's not entirely clear whether the two flags actually have any
>> meaning for x2APIC mode.
>
> Hm, indeed. That wants to be in a different fix however.
If any at all - it wouldn't be the first time that when adding x2APIC, editing
certain places simply didn't happen. If anything needs changing here, of course
I agree that the further adjustment would want to be a separate change.
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-30 16:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24 10:26 [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER Roger Pau Monne
2023-10-30 14:12 ` Jan Beulich
2023-10-30 14:13 ` Jan Beulich
2023-10-30 16:19 ` Roger Pau Monné
2023-10-30 16:32 ` Jan Beulich
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.