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

Re: [Xen-devel] [PATCH for-4.12] xen/iommu: fix dev assignment on ARM after 91d4eca7



On Tue, 8 Jan 2019, Jan Beulich wrote:
> >>> On 08.01.19 at 09:30, <Paul.Durrant@xxxxxxxxxx> wrote:
> >>  -----Original Message-----
> > [snip]
> >> >
> >> > The use of iommu_use_hap_pt() here is indeed a problem, but I think it
> >> would be sufficient to move the line "hd->status =
> >> IOMMU_STATUS_initializing" to just before the if rather than to a
> >> completely separate function.
> >> 
> >> Yes, that works too.
> >> 
> >> ---
> >> xen/iommu: fix dev assignment on ARM after 91d4eca7
> >> 
> >> Fix device assignment on ARM after 91d4eca7 "mm / iommu: split
> >> need_iommu() into has_iommu_pt() and need_iommu_pt_sync()".
> >> 
> >> arch_iommu_populate_page_table returns -ENOSYS which causes
> >> iommu_construct to return early, although it is not an error.
> >> 
> >> hd->status needs to be set to IOMMU_STATUS_initializing before calling
> >> iommu_use_hap_pt, otherwise iommu_use_hap_pt will return the wrong
> >> value.
> >> 
> >> Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx>
> > 
> > LGTM so you can add...
> > 
> > Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> > 
> >> 
> >> diff --git a/xen/drivers/passthrough/iommu.c
> >> b/xen/drivers/passthrough/iommu.c
> >> index ac62d7f..a6f69f4 100644
> >> --- a/xen/drivers/passthrough/iommu.c
> >> +++ b/xen/drivers/passthrough/iommu.c
> >> @@ -261,11 +261,11 @@ int iommu_construct(struct domain *d)
> >>      if ( hd->status == IOMMU_STATUS_initialized )
> >>          return 0;
> >> 
> >> +    hd->status = IOMMU_STATUS_initializing;
> >>      if ( !iommu_use_hap_pt(d) )
> 
> With a blank line inserted above here also
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Added and committed. Thanks!

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