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

Re: [Xen-devel] [PATCH v8 for-xen-4.5 2/2] dpci: Replace tasklet with an softirq (v8)



> > -void pci_release_devices(struct domain *d)
> > +int pci_release_devices(struct domain *d)
> >  {
> >      struct pci_dev *pdev;
> >      u8 bus, devfn;
> > +    int ret;
> >  
> >      spin_lock(&pcidevs_lock);
> > -    pci_clean_dpci_irqs(d);
> > +    ret = pci_clean_dpci_irqs(d);
> > +    if ( ret == -ERESTART )
> > +    {
> > +        spin_unlock(&pcidevs_lock);
> > +        return ret;
> > +    }
> >      while ( (pdev = pci_get_pdev_by_domain(d, -1, -1, -1)) )
> >      {
> >          bus = pdev->bus;
> 
> Even if errors other than -ERESTART aren't possible right now, the
> code now looks like it is ignoring such. I think it would be better if
> you simply dropped the special casing of -ERESTART and propagated
> all errors here.

The will cause a regression. The pci_clean_dpci_irqs will
now return -EINVAL if the iommu is turned off - which will mean
that we won't be able to kill an HVM guest without passthrough.

I can do:

1). if ( ret && !(ret == -EINVAL || ret == -E..))

2). Or remove the various 'return -EINVAL' in the  pci_clean_dpci_irqs
   for the causes where IOMMU is off or there are no PCI passthrough
   devices - and just make them return 0.

3). Leave it as is.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.