From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UotC1-0001jO-0f for qemu-devel@nongnu.org; Tue, 18 Jun 2013 06:31:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UotBz-0004Jz-Oc for qemu-devel@nongnu.org; Tue, 18 Jun 2013 06:31:16 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59340 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UotBz-0004Jv-IP for qemu-devel@nongnu.org; Tue, 18 Jun 2013 06:31:15 -0400 Message-ID: <51C036F1.9050102@suse.de> Date: Tue, 18 Jun 2013 12:31:13 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1371549586-4672-1-git-send-email-paul.durrant@citrix.com> <1371549586-4672-3-git-send-email-paul.durrant@citrix.com> In-Reply-To: <1371549586-4672-3-git-send-email-paul.durrant@citrix.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] Move hardcoded initialization of xen-platform device. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Durrant Cc: Paolo Bonzini , qemu-devel@nongnu.org, xen-devel@lists.xen.org Am 18.06.2013 11:59, schrieb Paul Durrant: > Creation of the xen-platform device is currently hardcoded into machine > type pc's initialization code, guarded by a test for the whether the xe= n > accelerator is enabled. This patch moves the creation of xen-platform i= nto > the initialization code of the xenfv machine type. This maintains backw= ards > compatibility for that machine type but allows more flexibility if anot= her > machine type is used with Xen HVM domains. >=20 > Signed-off-by: Paul Durrant > --- > hw/i386/pc_piix.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > index 7bbb59a..8dd487e 100644 > --- a/hw/i386/pc_piix.c > +++ b/hw/i386/pc_piix.c > @@ -179,9 +179,6 @@ static void pc_init1(MemoryRegion *system_memory, > pc_register_ferr_irq(gsi[13]); > =20 > pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL); > - if (xen_enabled()) { > - pci_create_simple(pci_bus, -1, "xen-platform"); > - } > =20 > /* init basic PC hardware */ > pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enable= d()); > @@ -325,7 +322,13 @@ static void pc_init_isa(QEMUMachineInitArgs *args) > #ifdef CONFIG_XEN > static void pc_xen_hvm_init(QEMUMachineInitArgs *args) > { > + PCIBus *bus; > + > pc_init_pci(args); > + > + bus =3D pci_find_root_bus(0); > + if (bus !=3D NULL) > + pci_create_simple(bus, -1, "xen-platform"); scripts/checkpatch.pl will complain about missing braces for if, but otherwise looks okay to me. Andreas > } > #endif > =20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg