From: Knut Omang <knut.omang@oracle.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Knut Omang <knut.omang@oracle.com>,
"Richard W.M. Jones" <rjones@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
Jan Kiszka <jan.kiszka@web.de>, Dotan Barak <dotanb@mellanox.com>,
Marcel Apfelbaum <marcel@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH v6 1/4] pci: Make use of the devfn property when registering new devices
Date: Thu, 22 Oct 2015 10:01:32 +0200 [thread overview]
Message-ID: <1445500895-27165-2-git-send-email-knut.omang@oracle.com> (raw)
In-Reply-To: <1445500895-27165-1-git-send-email-knut.omang@oracle.com>
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.
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Knut Omang <knut.omang@oracle.com>
---
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 b0bf540..b095cfe 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);
if (pci_dev == NULL)
return;
--
2.4.3
next prev parent reply other threads:[~2015-10-22 8:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 8:01 [Qemu-devel] [PATCH v6 0/4] pcie: Add support for Single Root I/O Virtualization Knut Omang
2015-10-22 8:01 ` Knut Omang [this message]
2015-10-22 8:01 ` [Qemu-devel] [PATCH v6 2/4] pcie: Add support for Single Root I/O Virtualization (SR/IOV) Knut Omang
2015-10-22 8:51 ` Dotan Barak
2015-10-22 8:54 ` Marcel Apfelbaum
2015-10-22 8:01 ` [Qemu-devel] [PATCH v6 3/4] pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt Knut Omang
2015-10-22 8:01 ` [Qemu-devel] [PATCH v6 4/4] pcie: A few minor fixes (type+code simplify) Knut Omang
2015-10-22 8:27 ` [Qemu-devel] [PATCH v6 0/4] pcie: Add support for Single Root I/O Virtualization Knut Omang
2015-10-22 13:14 ` Michael S. Tsirkin
2015-10-22 13:47 ` Knut Omang
2015-10-22 14:22 ` Dotan Barak
2015-10-22 14:39 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445500895-27165-2-git-send-email-knut.omang@oracle.com \
--to=knut.omang@oracle.com \
--cc=alex.williamson@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=dotanb@mellanox.com \
--cc=ehabkost@redhat.com \
--cc=jan.kiszka@web.de \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).