Date: Mon, 20 Mar 2023 09:28:20 +0100 From: Jan Beulich AMD/IOMMU: without XT, x2APIC needs to be forced into physical mode An earlier change with the same title (commit 1ba66a870eba) altered only the path where x2apic_phys was already set to false (perhaps from the command line). The same of course needs applying when the variable wasn't modified yet from its initial value. Reported-by: Elliott Mitchell Signed-off-by: Jan Beulich --- unstable.orig/xen/arch/x86/genapic/x2apic.c +++ unstable/xen/arch/x86/genapic/x2apic.c @@ -236,11 +236,11 @@ const struct genapic *__init apic_x2apic if ( x2apic_phys < 0 ) { /* - * Force physical mode if there's no interrupt remapping support: The - * ID in clustered mode requires a 32 bit destination field due to + * Force physical mode if there's no (full) interrupt remapping support: + * The ID in clustered mode requires a 32 bit destination field due to * the usage of the high 16 bits to hold the cluster ID. */ - x2apic_phys = !iommu_intremap || + 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));