Skip to contentSkip to conversation

x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER

PATCH In review Roger Pau Monne 2 participants 5 messages Oct 24, 2023 – Oct 30, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER

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')
---
 xen/arch/x86/genapic/x2apic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
xen/arch/x86/genapic/x2apic.c +1 -2
index ca1db27157e2..707deef98c27 100644
@@ -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 )
Signature · 1 line
2.42.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Roger Pau Monne

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')
#2 lore raw
In reply to Roger Pau Monne
Quoted 8 lines · Roger Pau Monne

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

#3 lore raw
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Roger Pau Monne

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.

Quoted 7 lines
Quoted 3 lines

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.

#4 lore raw
Quoted 11 lines · Roger Pau Monné
Quoted 10 lines · Jan Beulich
Quoted 8 lines · Roger Pau Monne

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.

Quoted 5 lines
Quoted 3 lines

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