Re: [Xen-devel] [PATCH] x86/vtd: fix iommu_share_p2m_table

2018-10-08 Thread Jan Beulich
>>> On 08.10.18 at 12:50, wrote: > On Mon, Oct 08, 2018 at 12:37:39PM +0200, Roger Pau Monné wrote: >> On Mon, Oct 08, 2018 at 04:33:04AM -0600, Jan Beulich wrote: >> > >>> On 08.10.18 at 12:14, wrote: >> > > --- a/xen/drivers/passthrough/iommu.c >> > > +++ b/xen/drivers/passthrough/iommu.c >> >

Re: [Xen-devel] [PATCH] x86/vtd: fix iommu_share_p2m_table

2018-10-08 Thread Roger Pau Monné
On Mon, Oct 08, 2018 at 12:37:39PM +0200, Roger Pau Monné wrote: > On Mon, Oct 08, 2018 at 04:33:04AM -0600, Jan Beulich wrote: > > >>> On 08.10.18 at 12:14, wrote: > > > --- a/xen/drivers/passthrough/iommu.c > > > +++ b/xen/drivers/passthrough/iommu.c > > > @@ -505,7 +505,7 @@ int iommu_do_domctl

Re: [Xen-devel] [PATCH] x86/vtd: fix iommu_share_p2m_table

2018-10-08 Thread Roger Pau Monné
On Mon, Oct 08, 2018 at 04:33:04AM -0600, Jan Beulich wrote: > >>> On 08.10.18 at 12:14, wrote: > > --- a/xen/drivers/passthrough/iommu.c > > +++ b/xen/drivers/passthrough/iommu.c > > @@ -505,7 +505,7 @@ int iommu_do_domctl( > > > > void iommu_share_p2m_tableiommu_share_p2m_table(struct domain*

Re: [Xen-devel] [PATCH] x86/vtd: fix iommu_share_p2m_table

2018-10-08 Thread Jan Beulich
>>> On 08.10.18 at 12:27, wrote: >> -Original Message- >> From: Roger Pau Monne [mailto:roger@citrix.com] >> Sent: 08 October 2018 11:15 >> To: xen-devel@lists.xenproject.org >> Cc: Roger Pau Monne ; Jan Beulich >> ; Paul Durrant >> Subject: [PATCH] x86/vtd: fix iommu_share_p2m_tabl

Re: [Xen-devel] [PATCH] x86/vtd: fix iommu_share_p2m_table

2018-10-08 Thread Jan Beulich
>>> On 08.10.18 at 12:14, wrote: > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -505,7 +505,7 @@ int iommu_do_domctl( > > void iommu_share_p2m_table(struct domain* d) > { > -if ( iommu_use_hap_pt(d) ) > +if ( iommu_enabled && hap_enabled(d) && iomm

Re: [Xen-devel] [PATCH] x86/vtd: fix iommu_share_p2m_table

2018-10-08 Thread Paul Durrant
> -Original Message- > From: Roger Pau Monne [mailto:roger@citrix.com] > Sent: 08 October 2018 11:15 > To: xen-devel@lists.xenproject.org > Cc: Roger Pau Monne ; Jan Beulich > ; Paul Durrant > Subject: [PATCH] x86/vtd: fix iommu_share_p2m_table > > Commit 2916951c1 changed the check i

[Xen-devel] [PATCH] x86/vtd: fix iommu_share_p2m_table

2018-10-08 Thread Roger Pau Monne
Commit 2916951c1 changed the check in iommu_share_p2m_table to use need_iommu(d) instead of iommu_enabled, which broke the check because at the point in domain construction where iommu_share_p2m_table is called need_iommu(d) will always return false. Fix this by reverting to the previous logic. S