[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 2/2] AMD/IOMMU: without XT, x2APIC needs to be forced into physical mode



On Fri, Feb 28, 2020 at 01:12:03PM +0100, Jan Beulich wrote:
> The wider cluster mode APIC IDs aren't generally representable. Convert
> the iommu_intremap variable into a tristate, allowing the AMD IOMMU
> driver to signal this special restriction to the apic_x2apic_probe().
> (Note: assignments to the variable get adjusted, while existing
> consumers - all assuming a boolean property - are left alone.)
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> v2: New.
> 
> --- a/xen/arch/x86/genapic/x2apic.c
> +++ b/xen/arch/x86/genapic/x2apic.c
> @@ -236,12 +236,21 @@ const struct genapic *__init apic_x2apic
>          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;
> -    }
> +    else if ( !x2apic_phys )
> +        switch ( iommu_intremap )
> +        {
> +        case iommu_intremap_off:
> +        case iommu_intremap_restricted:
> +            printk("WARNING: x2APIC cluster mode is not supported %s 
> interrupt remapping\n"
> +                   "x2APIC: forcing phys mode\n",
> +                   iommu_intremap == iommu_intremap_off ? "without"
> +                                                        : "with restricted");
> +            x2apic_phys = true;

I think you also need to fixup the usage of iommu_intremap in __cpu_up
so that CPUs with APIC IDs > 255 are not brought up when in
iommu_intremap_restricted mode.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.