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

Re: [Xen-devel] [PATCH 1/2] x2APIC: translate IO-APIC entries when enabling the IOMMU


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 10 Oct 2019 13:24:30 +0200
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Thu, 10 Oct 2019 11:24:43 +0000
  • Ironport-sdr: xJNDq36SCmgzRVQqmGuVOcjvZSoeeZq/dYvGuld5vNO9umSDFRjyFmJo4oV21KJl4Z2CBbFgyU AmIN4dug8UHdMv6/E1VRc68Rur6nSBWiRWGZSsQ7UMl+sxjh87vSBQ5IEuPcsqit9DeeeUWx4q R1A866/ZWE8DRcLWpdRAM4AGE5C34oHeYybNOhZlhC2iCUAi0CKQemg9ZvgWMMWGs0NoRGsIrb /Elaz6W6KZxfZ33zeIo9oqloKKDPg8iVrDtHZcv880E486rhTNDtpGfoEAfNCvdnZdeFeVQdW1 pAk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Oct 10, 2019 at 01:03:38PM +0200, Roger Pau Monne wrote:
> When interrupt remapping is enabled as part of enabling x2APIC the
> IO-APIC entries also need to be translated to the new format and added
> to the interrupt remapping table.
> 
> This prevents IOMMU interrupt remapping faults when booting on
> hardware that has unmasked IO-APIC pins.
> 
> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
> Cc: Juergen Gross <jgross@xxxxxxxx>
> ---
>  xen/arch/x86/apic.c           | 12 ++++++++++--
>  xen/arch/x86/io_apic.c        |  5 +++--
>  xen/include/asm-x86/io_apic.h |  3 ++-
>  3 files changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
> index 6cdb50cf41..9810de7473 100644
> --- a/xen/arch/x86/apic.c
> +++ b/xen/arch/x86/apic.c
> @@ -515,7 +515,7 @@ static void resume_x2apic(void)
>      iommu_enable_x2apic();
>      __enable_x2apic();
>  
> -    restore_IO_APIC_setup(ioapic_entries);
> +    restore_IO_APIC_setup(ioapic_entries, true);
>      unmask_8259A();
>  
>  out:
> @@ -887,6 +887,7 @@ void __init x2apic_bsp_setup(void)
>  {
>      struct IO_APIC_route_entry **ioapic_entries = NULL;
>      const char *orig_name;
> +    bool iommu_enabled = true;

There's no need for this local variable, x2apic_enabled can be used
instead.

Will send a new version, sorry.

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®.