From: "Andreas Färber" <afaerber@suse.de>
To: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Gavin Shan <shangw@linux.vnet.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
qemu-devel@nongnu.org, Ram Pai <pair@us.ibm.com>,
Blue Swirl <blauwirbel@gmail.com>,
Stefan Weil <weil@mail.berlios.de>,
Liu Ping Fan <kernelfans@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 3/5] convert pci-host to QOM
Date: Wed, 18 Jul 2012 16:07:13 +0200 [thread overview]
Message-ID: <5006C311.8040405@suse.de> (raw)
In-Reply-To: <1342617545-9261-4-git-send-email-liwanp@linux.vnet.ibm.com>
Am 18.07.2012 15:19, schrieb Wanpeng Li:
> [CCing ML]
>
> From: Anthony Liguori <aliguori@us.ibm.com>
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
> ---
> hw/pci_host.c | 26 ++++++++++++++++++++++++++
> hw/pci_host.h | 5 +++++
> 2 files changed, 31 insertions(+), 0 deletions(-)
Note: This is a resend of an old patch that conflicts with my more
recent pci_host series and does not take recent review comments into
account (e.g., PCI_HOST_BRIDGE() was requested). Please take a look at
those patches and participate in the review, so that we can get it in soon.
Thanks,
Andreas
>
> diff --git a/hw/pci_host.c b/hw/pci_host.c
> index 8041778..095bfe3 100644
> --- a/hw/pci_host.c
> +++ b/hw/pci_host.c
> @@ -165,4 +165,30 @@ const MemoryRegionOps pci_host_data_be_ops = {
> .endianness = DEVICE_BIG_ENDIAN,
> };
>
> +void pci_host_set_mmio(PCIHostState *s, MemoryRegion *value)
> +{
> + object_property_set_link(OBJECT(s), OBJECT(value), "mmio", NULL);
> +}
> +
> +static void pci_host_initfn(Object *obj)
> +{
> + PCIHostState *s = PCI_HOST(obj);
> +
> + object_property_add_link(obj, "mmio", TYPE_MEMORY_REGION,
> + (Object **)&s->address_space, NULL);
> +}
> +
> +static TypeInfo pci_host_type_info = {
> + .name = TYPE_PCI_HOST,
> + .parent = TYPE_SYS_BUS_DEVICE,
> + .instance_size = sizeof(PCIHostState),
> + .instance_init = pci_host_initfn,
> +};
> +
> +static void register_devices(void)
> +{
> + type_register_static(&pci_host_type_info);
> +}
> +
> +type_init(register_devices)
>
> diff --git a/hw/pci_host.h b/hw/pci_host.h
> index 359e38f..084e15c 100644
> --- a/hw/pci_host.h
> +++ b/hw/pci_host.h
> @@ -30,6 +30,9 @@
>
> #include "sysbus.h"
>
> +#define TYPE_PCI_HOST "pci-host"
> +#define PCI_HOST(obj) OBJECT_CHECK(PCIHostState, (obj), TYPE_PCI_HOST)
> +
> struct PCIHostState {
> SysBusDevice busdev;
> MemoryRegion conf_mem;
> @@ -49,6 +52,8 @@ uint32_t pci_host_config_read_common(PCIDevice *pci_dev, uint32_t addr,
> void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len);
> uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len);
>
> +void pci_host_set_mmio(PCIHostState *s, MemoryRegion *value);
> +
> extern const MemoryRegionOps pci_host_conf_le_ops;
> extern const MemoryRegionOps pci_host_conf_be_ops;
> extern const MemoryRegionOps pci_host_data_le_ops;
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-07-18 14:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 13:19 [Qemu-devel] [PATCH v4 0/5] refactor PC machine, i440fx and piix3 to take advantage of QOM Wanpeng Li
2012-07-18 13:19 ` [Qemu-devel] [PATCH v4 1/5] eliminate piix_pci.c and module i440fx and piix3 Wanpeng Li
2012-07-18 13:19 ` [Qemu-devel] [PATCH v4 2/5] convert MemoryRegion to QOM Wanpeng Li
2012-07-18 13:19 ` [Qemu-devel] [PATCH v4 3/5] convert pci-host " Wanpeng Li
2012-07-18 14:07 ` Andreas Färber [this message]
2012-07-18 13:19 ` [Qemu-devel] [PATCH v4 4/5] prepare to create HPET, RTC and i8254 through composition Wanpeng Li
2012-07-18 14:39 ` Markus Armbruster
2012-07-19 20:24 ` Anthony Liguori
2012-07-20 9:51 ` Markus Armbruster
2012-07-19 20:23 ` Anthony Liguori
2012-07-20 3:42 ` Wanpeng Li
2012-07-18 13:19 ` [Qemu-devel] [PATCH v4 5/5] merge pc_piix.c to pc.c Wanpeng Li
2012-07-18 16:14 ` Michael S. Tsirkin
2012-07-18 17:43 ` [Qemu-devel] [PATCH v4 0/5] refactor PC machine, i440fx and piix3 to take advantage of QOM Paolo Bonzini
2012-07-19 20:27 ` Anthony Liguori
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=5006C311.8040405@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=kernelfans@gmail.com \
--cc=liwanp@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=pair@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shangw@linux.vnet.ibm.com \
--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).