Re: [Xen-devel] [PATCH v2 09/30] x86/vtd: fix and simplify mapping RMRR regions

2016-09-30 Thread Jan Beulich
>>> On 30.09.16 at 17:02, wrote: > On Fri, Sep 30, 2016 at 07:21:41AM -0600, Jan Beulich wrote: >> >>> On 30.09.16 at 13:27, wrote: >> > On Thu, Sep 29, 2016 at 08:18:36AM -0600, Jan Beulich wrote: >> >> >>> On 27.09.16 at 17:57, wrote: >> >> > +{ >> >> > +int rc; >> >> > + >> >> > +whil

Re: [Xen-devel] [PATCH v2 09/30] x86/vtd: fix and simplify mapping RMRR regions

2016-09-30 Thread Roger Pau Monne
On Fri, Sep 30, 2016 at 07:21:41AM -0600, Jan Beulich wrote: > >>> On 30.09.16 at 13:27, wrote: > > On Thu, Sep 29, 2016 at 08:18:36AM -0600, Jan Beulich wrote: > >> >>> On 27.09.16 at 17:57, wrote: > >> > +{ > >> > +int rc; > >> > + > >> > +while ( nr_pages > 0 ) > >> > +{ > >> > +

Re: [Xen-devel] [PATCH v2 09/30] x86/vtd: fix and simplify mapping RMRR regions

2016-09-30 Thread Jan Beulich
>>> On 30.09.16 at 13:27, wrote: > On Thu, Sep 29, 2016 at 08:18:36AM -0600, Jan Beulich wrote: >> >>> On 27.09.16 at 17:57, wrote: >> > +{ >> > +int rc; >> > + >> > +while ( nr_pages > 0 ) >> > +{ >> > +rc = (map ? map_mmio_regions : unmap_mmio_regions) >> > + (d,

Re: [Xen-devel] [PATCH v2 09/30] x86/vtd: fix and simplify mapping RMRR regions

2016-09-30 Thread Roger Pau Monne
On Thu, Sep 29, 2016 at 08:18:36AM -0600, Jan Beulich wrote: > >>> On 27.09.16 at 17:57, wrote: > > The current code used by Intel VTd will only map RMRR regions for the > > hardware domain, but will fail to map RMRR regions for unprivileged domains > > unless the page tables are shared between EP

Re: [Xen-devel] [PATCH v2 09/30] x86/vtd: fix and simplify mapping RMRR regions

2016-09-29 Thread Jan Beulich
>>> On 27.09.16 at 17:57, wrote: > The current code used by Intel VTd will only map RMRR regions for the > hardware domain, but will fail to map RMRR regions for unprivileged domains > unless the page tables are shared between EPT and IOMMU. Okay, if that's the case it surely should get fixed. >

[Xen-devel] [PATCH v2 09/30] x86/vtd: fix and simplify mapping RMRR regions

2016-09-27 Thread Roger Pau Monne
The current code used by Intel VTd will only map RMRR regions for the hardware domain, but will fail to map RMRR regions for unprivileged domains unless the page tables are shared between EPT and IOMMU. Fix this and simplify the code, removing the {set/clear}_identity_p2m_entry helpers and just usi