qemu-devel
[Top][All Lists]
Advanced

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

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


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH v2 1/4] pci: Make use of the devfn property when registering new devices
Date: Tue, 2 Sep 2014 16:03:23 +0300

On Tue, Sep 02, 2014 at 01:00:03PM +0200, 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>

Sorry, I don't understand the explanation exactly.
pci_dev->devfn is not set correctly? why?

> ---
>  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 daeaeac..6b21dee 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -1757,7 +1757,7 @@ static int pci_qdev_init(DeviceState *qdev)
>      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);
> +                                     object_property_get_int(OBJECT(qdev), 
> "addr", NULL));
>      if (pci_dev == NULL)
>          return -1;
>  
> -- 
> 1.9.0



reply via email to

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