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

Re: [Xen-devel] [PATCH 1/2] x86/iommu: avoid mapping the interrupt address range for hwdom


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Thu, 25 Jul 2019 11:28:06 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=Paul.Durrant@xxxxxxxxxx; spf=Pass smtp.mailfrom=Paul.Durrant@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 25 Jul 2019 11:28:14 +0000
  • Ironport-sdr: l7GNx4xzqUWq1Usa4zbZcBNhn5TzuGYsyXPVhnvFVJHJ36lYlbRfahqjVkpkok2PVe1szmYqq5 81ROTvHhk1S5a18QbgBhnXnk27hdENsHRkPa8Yj4Q7P9TaPwJJVIMuJkq5MH/xGNIm87SujFkB H+WNPfTsXmUvqROLxI74vsEDWmkhF/Gtr+Qn1WEdpVoG1oYIiDlm/GWNIwHRrX8AmGwWyOzHg1 kQWVbz45mGuzHmThSO04GEwL5ObRTsyEoNfwIxxQACyV2WLNsJzlGDrlvugAhg07djSZH72+Ib Rzs=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVQtNlBYiYbAvLoki7QHgazq2Xo6bbB3MAgAAqs5A=
  • Thread-topic: [Xen-devel] [PATCH 1/2] x86/iommu: avoid mapping the interrupt address range for hwdom

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of Roger 
> Pau Monné
> Sent: 25 July 2019 11:54
> To: Jan Beulich <JBeulich@xxxxxxxx>
> Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH 1/2] x86/iommu: avoid mapping the interrupt 
> address range for hwdom
> 
> On Thu, Jul 25, 2019 at 10:22:17AM +0000, Jan Beulich wrote:
> > On 23.07.2019 17:48, Roger Pau Monne wrote:
> > > Current code only prevent mapping the lapic page into the guest
> > > physical memory map. Expand the range to be 0xFEEx_xxxx as described
> > > in the Intel VTd specification section 3.13 "Handling Requests to
> > > Interrupt Address Range".
> > >
> > > AMD also lists this address range in the AMD SR5690 Databook, section
> > > 2.4.4 "MSI Interrupt Handling and MSI to HT Interrupt Conversion".
> > >
> > > Requested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> > > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >
> > I've committed this on the basis that it shouldn't hurt, but having
> > thought about this some more I'm not really sure I see the point:
> > The IOMMU special cases accesses into this range anyway, to redirect
> > lookup to the interrupt remapping table instead of the DMA remapping
> > one. Hence any mappings inserted into this range are simply useless,
> > but shouldn't otherwise hurt.
> 
> Intel SDM contains:
> 
> "Software must ensure the second-level paging-structure entries are
> programmed not to remap input addresses to the interrupt address
> range. Hardware behavior is undefined for memory requests remapped to
> the interrupt address range."
> 
> In section 3.13 (Handling Requests to Interrupt Address Range).
> 
> Since arch_iommu_hwdom_init/hwdom_iommu_map adds entries to both the
> hap and the iommu page tables (or to hap only if shared) Xen should be
> careful to not map this range because the iommu special cases this
> range, but I'm not sure what hap does.

Presumably such ranges should never end up in the P2M as they'd need to be 
trapped for emulation?

  Paul

> 
> Thanks, Roger.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
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®.