qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 3/7] pci: call IOMMU hooks


From: Eduard - Gabriel Munteanu
Subject: Re: [Qemu-devel] [RFC PATCH 3/7] pci: call IOMMU hooks
Date: Thu, 15 Jul 2010 01:50:14 +0300
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Jul 14, 2010 at 04:37:39PM +0900, Isaku Yamahata wrote:
> On Wed, Jul 14, 2010 at 08:45:03AM +0300, Eduard - Gabriel Munteanu wrote:

[snip]

> >  PCIDevice *pci_register_device(PCIBus *bus, const char *name,
> >                                 int instance_size, int devfn,
> >                                 PCIConfigReadFunc *config_read,
> >                                 PCIConfigWriteFunc *config_write)
> >  {
> >      PCIDevice *pci_dev;
> > +    int err;
> >  
> >      pci_dev = qemu_mallocz(instance_size);
> >      pci_dev = do_pci_register_device(pci_dev, bus, name, devfn,
> > @@ -747,6 +761,13 @@ PCIDevice *pci_register_device(PCIBus *bus, const char 
> > *name,
> >      if (pci_dev == NULL) {
> >          hw_error("PCI: can't register device\n");
> >      }
> > +
> > +    err = pci_iommu_register_device(bus, pci_dev);
> > +    if (err) {
> > +        hw_error("PCI: can't register device with IOMMU\n");
> > +        return NULL;
> > +    }
> > +
> >      return pci_dev;
> >  }
> 
> pci_register_device() is pre-qdev api.
> qdev'fied device doesn't call pci_register_device().
> So please move the initialization hook into do_pci_register_device()
> which are commonly used by pci_register_device() and pci_qdev_init().
> -- 
> yamahata

Thanks, I didn't need the functionality and missed this.


        Eduard




reply via email to

[Prev in Thread] Current Thread [Next in Thread]