From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcX6h-0003yg-7l for qemu-devel@nongnu.org; Thu, 17 Sep 2015 07:12:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcX6c-0002Uz-8q for qemu-devel@nongnu.org; Thu, 17 Sep 2015 07:12:03 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:36023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcX6c-0002Uh-22 for qemu-devel@nongnu.org; Thu, 17 Sep 2015 07:11:58 -0400 Received: by wicgb1 with SMTP id gb1so112912885wic.1 for ; Thu, 17 Sep 2015 04:11:57 -0700 (PDT) References: <1442061415-17430-1-git-send-email-knut.omang@oracle.com> <1442061415-17430-2-git-send-email-knut.omang@oracle.com> From: Marcel Apfelbaum Message-ID: <55FA9FFA.2020901@gmail.com> Date: Thu, 17 Sep 2015 14:11:54 +0300 MIME-Version: 1.0 In-Reply-To: <1442061415-17430-2-git-send-email-knut.omang@oracle.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 1/3] pci: Make use of the devfn property when registering new devices Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Knut Omang , qemu-devel@nongnu.org Cc: Eduardo Habkost , "Michael S. Tsirkin" , "Richard W.M. Jones" , Alex Williamson , "Gonglei (Arei)" , Jan Kiszka , Paolo Bonzini , Dotan Barak , Richard Henderson 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 > --- > 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? Thanks, Marcel > if (pci_dev == NULL) > return; > >