From: "Andreas Färber" <afaerber@suse.de>
To: Paul Durrant <paul.durrant@citrix.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, xen-devel@lists.xen.org
Subject: Re: [Qemu-devel] [PATCH 2/2] Move hardcoded initialization of xen-platform device.
Date: Tue, 18 Jun 2013 12:31:13 +0200 [thread overview]
Message-ID: <51C036F1.9050102@suse.de> (raw)
In-Reply-To: <1371549586-4672-3-git-send-email-paul.durrant@citrix.com>
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 xen
> accelerator is enabled. This patch moves the creation of xen-platform into
> the initialization code of the xenfv machine type. This maintains backwards
> compatibility for that machine type but allows more flexibility if another
> machine type is used with Xen HVM domains.
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> hw/i386/pc_piix.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> 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]);
>
> pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
> - if (xen_enabled()) {
> - pci_create_simple(pci_bus, -1, "xen-platform");
> - }
>
> /* init basic PC hardware */
> pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled());
> @@ -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 = pci_find_root_bus(0);
> + if (bus != 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
>
--
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:[~2013-06-18 10:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 9:59 [Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v3) Paul Durrant
2013-06-18 9:59 ` [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains Paul Durrant
2013-06-18 10:28 ` Andreas Färber
2013-06-18 10:34 ` Paul Durrant
2013-06-18 9:59 ` [Qemu-devel] [PATCH 2/2] Move hardcoded initialization of xen-platform device Paul Durrant
2013-06-18 10:31 ` Andreas Färber [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-06-18 11:16 [Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v4) Paul Durrant
2013-06-18 11:17 ` [Qemu-devel] [PATCH 2/2] Move hardcoded initialization of xen-platform device Paul Durrant
2013-06-17 12:36 [Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v2) Paul Durrant
2013-06-17 12:36 ` [Qemu-devel] [PATCH 2/2] Move hardcoded initialization of xen-platform device Paul Durrant
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=51C036F1.9050102@suse.de \
--to=afaerber@suse.de \
--cc=paul.durrant@citrix.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xen-devel@lists.xen.org \
/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).