qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/3] pci: Make use of the devfn property when


From: Knut Omang
Subject: Re: [Qemu-devel] [PATCH v4 1/3] pci: Make use of the devfn property when registering new devices
Date: Thu, 17 Sep 2015 14:12:16 +0200

On Thu, 2015-09-17 at 14:11 +0300, Marcel Apfelbaum wrote:
> On 09/12/2015 03:36 PM, Knut Omang wrote:
> > Without this, the devfn argument to pci_create_*()
> > does not affect the assigned devfn.
> > 
> > Needed to support (VF_STRIDE,VF_OFFSET) values other than (1,1)
> > for SR/IOV.
> > 
> > Signed-off-by: Knut Omang <address@hidden>
> > ---
> >   hw/pci/pci.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> > index ccea628..a5cc015 100644
> > --- a/hw/pci/pci.c
> > +++ b/hw/pci/pci.c
> > @@ -1840,7 +1840,7 @@ static void pci_qdev_realize(DeviceState
> > *qdev, Error **errp)
> >       bus = PCI_BUS(qdev_get_parent_bus(qdev));
> >       pci_dev = do_pci_register_device(pci_dev, bus,
> >                                       
> >  object_get_typename(OBJECT(qdev)),
> > -                                     pci_dev->devfn, errp);
> > +                                    
> >  object_property_get_int(OBJECT(qdev), "addr", NULL), errp);
> Hi,
> 
> I don't get this, using object_property_get_int on "addr" should
> return the value of pci_dev->devfn,
> can you please tell what exactly is not working?

The problem is that at that point pci_dev->devfn has not been set yet -
have commented on this before somewhere..

Knut

> Thanks,
> Marcel
> 
> 
> 
> >       if (pci_dev == NULL)
> >           return;
> > 
> > 
> 



reply via email to

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