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

Re: [Xen-devel] [PATCH v3 1/4] iommu / x86: move call to scan_pci_devices() out of vendor code



> -----Original Message-----
> From: Jan Beulich <JBeulich@xxxxxxxx>
> Sent: 24 July 2019 14:41
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Brian Woods <brian.woods@xxxxxxx>; 
> Suravee Suthikulpanit
> <suravee.suthikulpanit@xxxxxxx>; Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; 
> Kevin Tian
> <kevin.tian@xxxxxxxxx>; Wei Liu <wl@xxxxxxx>
> Subject: Re: [PATCH v3 1/4] iommu / x86: move call to scan_pci_devices() out 
> of vendor code
> 
> On 16.07.2019 12:16, Paul Durrant wrote:
> > --- a/xen/drivers/passthrough/x86/iommu.c
> > +++ b/xen/drivers/passthrough/x86/iommu.c
> > @@ -28,9 +28,15 @@ struct iommu_ops __read_mostly iommu_ops;
> >
> >   int __init iommu_hardware_setup(void)
> >   {
> > +    int rc;
> > +
> >       if ( !iommu_init_ops )
> >           return -ENODEV;
> >
> > +    rc = scan_pci_devices();
> > +    if ( rc )
> > +        return rc;
> 
>  From an abstract POV I'm not convinced failing IOMMU init because
> a failed bus scan is appropriate. But the only currently possible
> failure is -ENOMEM, in which case we'd be in bigger trouble anyway.
> Therefore
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> The other question of course is in how far you can sensibly use
> the results of this (incomplete) bus scan later during IOMMU init.
> But hopefully that'll become clear from the subsequent patches.

The only use, at the moment, is for group assignment... but I do need to check 
that I haven't missed doing group assignment for subsequently added devices. I 
have a feeling I did miss it.

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