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

Re: [Xen-devel] [PATCH v2 4/4] x86/apic: allow enabling x2APIC mode regardless of interrupt remapping


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 4 Dec 2019 14:51:42 +0100
  • Authentication-results: esa3.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: xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Wed, 04 Dec 2019 13:51:59 +0000
  • Ironport-sdr: FX6mJxTT9VgPpCrFTZNvNCZQfdZZg0w82/rmZE5XgVIpz7UekiX4r+h6AI8vDZPMxSEzpGWrW3 lE+LMxl/+Qx+oeAdSnD9vG0FSSt5OPltvXB5vVhcUU16LxqNZXhAAIQc8z+Hzqxne5CL7jFvyx XRPanPnxva5AA/PVMKeQ21XUp9IzQpuFgFWXX25C0XiTg+LRWnv2AldOL3VMntZtXxWhMtOvWX mzhEhmUEtCt5//n+cXXSi5Ajc9+p9chLVYRmAHuP6FJGxtxpXp+x1cqNZtulCnIERBpbwHAZaX EJ0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Dec 03, 2019 at 04:33:09PM +0100, Jan Beulich wrote:
> On 29.11.2019 12:28, Roger Pau Monne wrote:
> > --- a/xen/arch/x86/apic.c
> > +++ b/xen/arch/x86/apic.c
> > @@ -492,7 +492,8 @@ static void __enable_x2apic(void)
> >  
> >  static void resume_x2apic(void)
> >  {
> > -    iommu_enable_x2apic();
> > +    if ( iommu_supports_x2apic() )
> > +        iommu_enable_x2apic();
> 
> The hooks called by this function are __init, and at least the AMD
> one also isn't (I think) prepared to be called more than once.

It's already called twice, there's one call to iommu_supports_x2apic
in x2apic_bsp_setup and another one in iommu_enable_x2apic, so I think
calling iommu_supports_x2apic multiple times is fine (or we would
already have issues).

I will cache the value of iommu_enable_x2apic to be used in the
suspend/resume paths of the local apic, so there's no need to call
iommu_supports_x2apic after init.

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