From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC576-00086S-S6 for qemu-devel@nongnu.org; Mon, 26 Mar 2012 04:17:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SC570-0005ms-N6 for qemu-devel@nongnu.org; Mon, 26 Mar 2012 04:17:16 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:45957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC570-0005ln-C0 for qemu-devel@nongnu.org; Mon, 26 Mar 2012 04:17:10 -0400 Received: by werp12 with SMTP id p12so4738470wer.4 for ; Mon, 26 Mar 2012 01:17:07 -0700 (PDT) Date: Mon, 26 Mar 2012 08:32:23 +0100 From: Stefan Hajnoczi Message-ID: <20120326073223.GA11693@stefanha-thinkpad.localdomain> References: <1332727608-26523-1-git-send-email-liwp@linux.vnet.ibm.com> <1332727608-26523-4-git-send-email-liwp@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1332727608-26523-4-git-send-email-liwp@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH 3/6] convert pci-host to QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wanpeng Li Cc: Gavin Shan , Anthony Liguori , qemu-devel@nongnu.org, Avi Kivity On Mon, Mar 26, 2012 at 10:06:45AM +0800, Wanpeng Li wrote: > diff --git a/hw/pci_host.c b/hw/pci_host.c > index 44c6c20..44d7e55 100644 > --- a/hw/pci_host.c > +++ b/hw/pci_host.c > @@ -162,4 +162,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); This patch has tabs instead of 4-space indent.