[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/apic: force phys mode if interrupt remapping is disabled
commit c08cbf7fb891943508956d85a83b8c1799b7dc2c Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Fri Dec 20 16:27:48 2019 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Dec 20 16:27:48 2019 +0100 x86/apic: force phys mode if interrupt remapping is disabled Cluster mode can only be used with interrupt remapping support, since the top 16bits of the APIC ID are filled with the cluster ID, and hence on systems where the physical ID is still smaller than 255 the cluster ID is not. Force x2APIC to use physical mode if there's no interrupt remapping support. Note that this requires a further patch in order to enable x2APIC without interrupt remapping support. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/genapic/x2apic.c | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index cb54a000fc..981a5e2381 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -2322,7 +2322,8 @@ Permit use of x2apic setup for SMP environments. ### x2apic_phys (x86) > `= <boolean>` -> Default: `true` if **FADT** mandates physical mode, `false` otherwise. +> Default: `true` if **FADT** mandates physical mode or if interrupt remapping +> is not available, `false` otherwise. In the case that x2apic is in use, this option switches between physical and clustered mode. The default, given no hint from the **FADT**, is cluster diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c index d5a17f10d5..1cb16bc10d 100644 --- a/xen/arch/x86/genapic/x2apic.c +++ b/xen/arch/x86/genapic/x2apic.c @@ -226,7 +226,21 @@ boolean_param("x2apic_phys", x2apic_phys); const struct genapic *__init apic_x2apic_probe(void) { if ( x2apic_phys < 0 ) - x2apic_phys = !!(acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL); + { + /* + * Force physical mode if there's no 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 || + (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL); + } + else if ( !x2apic_phys && !iommu_intremap ) + { + printk("WARNING: x2APIC cluster mode is not supported without interrupt remapping\n" + "x2APIC: forcing phys mode\n"); + x2apic_phys = true; + } if ( x2apic_phys ) return &apic_x2apic_phys; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |