qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appr


From: Isaku Yamahata
Subject: Re: [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately.
Date: Mon, 21 Jun 2010 18:52:16 +0900
User-agent: Mutt/1.5.19 (2009-01-05)

On Mon, Jun 21, 2010 at 11:45:15AM +0200, Juan Quintela wrote:
> Isaku Yamahata <address@hidden> wrote:
> > Set PCI multi-function bit according to multifunction property.
> > PCI address, devfn ,is exported to users as addr property,
> > so users can populate pci function(PCIDevice in qemu)
> > at arbitrary devfn.
> > It means each function(PCIDevice) don't know whether pci device
> > (PCIDevice[8]) is multi function or not.
> > So this patch allows user to set multifunction bit via property
> > and checks whether multifunction bit is set correctly.
> 
> [...]
> 
> > @@ -629,6 +668,9 @@ static PCIDevice *do_pci_register_device(PCIDevice 
> > *pci_dev, PCIBus *bus,
> >      if (is_bridge) {
> >          pci_init_wmask_bridge(pci_dev);
> >      }
> > +    if (pci_init_multifunction(bus, pci_dev)) {
> > +        return NULL;
> > +    }
> 
> Don't we have here a mem leak?
> what frees what pci_config_alloc() assignates in the error case?

Oh, you're right. Will fix it.

-- 
yamahata



reply via email to

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