From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Ram Pai <pair@us.ibm.com>, "Michael S. Tsirkin" <mst@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
qemu-devel@nongnu.org, Liu Ping Fan <kernelfans@gmail.com>,
Blue Swirl <blauwirbel@gmail.com>,
Stefan Weil <weil@mail.berlios.de>, Avi Kivity <avi@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v5 3/3] convert pci-host to QOM
Date: Thu, 8 Nov 2012 13:36:12 +0800 [thread overview]
Message-ID: <1352352972-2510-4-git-send-email-liwanp@linux.vnet.ibm.com> (raw)
In-Reply-To: <1352352972-2510-1-git-send-email-liwanp@linux.vnet.ibm.com>
Take advantage of Andreas's pci-host patchset, add instance_init function
to fully implement convert pci-host to QOM.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
hw/pci_host.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/hw/pci_host.c b/hw/pci_host.c
index 68e328c..ce6b28f 100644
--- a/hw/pci_host.c
+++ b/hw/pci_host.c
@@ -165,11 +165,20 @@ const MemoryRegionOps pci_host_data_be_ops = {
.endianness = DEVICE_BIG_ENDIAN,
};
+static void pci_host_initfn(Object *obj)
+{
+ PCIHostState *s = PCI_HOST_BRIDGE(obj);
+
+ object_property_add_link(obj, "mmio", "memory-region",
+ (Object **)&s->address_space, NULL);
+}
+
static const TypeInfo pci_host_type_info = {
.name = TYPE_PCI_HOST_BRIDGE,
.parent = TYPE_SYS_BUS_DEVICE,
.abstract = true,
.instance_size = sizeof(PCIHostState),
+ .instance_init = pci_host_initfn,
};
static void pci_host_register_types(void)
--
1.7.7.6
next prev parent reply other threads:[~2012-11-08 5:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 5:36 [Qemu-devel] [PATCH v5 0/3] refactor PC machine, i440fx and piix3 to take advantage of QOM Wanpeng Li
2012-11-08 5:36 ` [Qemu-devel] [PATCH v5 1/3] eliminate piix_pci.c and module i440fx and piix3 Wanpeng Li
2012-11-08 5:36 ` [Qemu-devel] [PATCH v5 2/3] merge pc_piix.c to pc.c Wanpeng Li
2012-11-08 5:36 ` Wanpeng Li [this message]
2012-11-15 0:55 ` [Qemu-devel] [PATCH v5 3/3] convert pci-host to QOM Andreas Färber
2012-11-15 0:16 ` [Qemu-devel] [PATCH v5 0/3] refactor PC machine, i440fx and piix3 to take advantage of QOM Wanpeng Li
-- strict thread matches above, loose matches on Subject: below --
2012-07-23 12:35 Wanpeng Li
2012-07-23 12:35 ` [Qemu-devel] [PATCH v5 3/3] convert pci-host to QOM Wanpeng Li
2012-07-23 12:57 ` Andreas Färber
2012-07-23 13:27 ` Wanpeng Li
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=1352352972-2510-4-git-send-email-liwanp@linux.vnet.ibm.com \
--to=liwanp@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=kernelfans@gmail.com \
--cc=mst@redhat.com \
--cc=pair@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=weil@mail.berlios.de \
/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).