From: "Philippe Mathieu-Daudé" <philmd@redhat.com> To: qemu-devel@nongnu.org Cc: "Stefano Stabellini" <sstabellini@kernel.org>, "Eduardo Habkost" <ehabkost@redhat.com>, "Paul Durrant" <paul@xen.org>, "Michael S. Tsirkin" <mst@redhat.com>, "Paolo Bonzini" <pbonzini@redhat.com>, "Anthony Perard" <anthony.perard@citrix.com>, xen-devel@lists.xenproject.org, "Richard Henderson" <rth@twiddle.net>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, "Roger Pau Monné" <roger.pau@citrix.com> Subject: [PATCH-for-5.2] hw/i386/q35: Remove unreachable Xen code on Q35 machine Date: Wed, 22 Jul 2020 10:25:17 +0200 [thread overview] Message-ID: <20200722082517.18708-1-philmd@redhat.com> (raw) Xen accelerator requires specific changes to a machine to be able to use it. See for example the 'Xen PC' machine configure its PCI bus calling pc_xen_hvm_init_pci(). There is no 'Xen Q35' machine declared. This code was probably added while introducing the Q35 machine, based on the existing PC machine (see commit df2d8b3ed4 "Introduce q35 pc based chipset emulator"). Remove the unreachable code to simplify this file. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- hw/i386/pc_q35.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a3e607a544..12f5934241 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -34,9 +34,7 @@ #include "sysemu/arch_init.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/xen/xen.h" #include "sysemu/kvm.h" -#include "sysemu/xen.h" #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" #include "hw/qdev-properties.h" @@ -179,10 +177,6 @@ static void pc_q35_init(MachineState *machine) x86ms->below_4g_mem_size = machine->ram_size; } - if (xen_enabled()) { - xen_hvm_init(pcms, &ram_memory); - } - x86_cpus_init(x86ms, pcmc->default_cpu_version); kvmclock_create(); @@ -208,10 +202,7 @@ static void pc_q35_init(MachineState *machine) } /* allocate ram and load rom/bios */ - if (!xen_enabled()) { - pc_memory_init(pcms, get_system_memory(), - rom_memory, &ram_memory); - } + pc_memory_init(pcms, get_system_memory(), rom_memory, &ram_memory); /* create pci host bus */ q35_host = Q35_HOST_DEVICE(qdev_new(TYPE_Q35_HOST_DEVICE)); @@ -271,7 +262,7 @@ static void pc_q35_init(MachineState *machine) assert(pcms->vmport != ON_OFF_AUTO__MAX); if (pcms->vmport == ON_OFF_AUTO_AUTO) { - pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; + pcms->vmport = ON_OFF_AUTO_ON; } /* init basic PC hardware */ -- 2.21.3
WARNING: multiple messages have this Message-ID (diff)
From: "Philippe Mathieu-Daudé" <philmd@redhat.com> To: qemu-devel@nongnu.org Cc: "Stefano Stabellini" <sstabellini@kernel.org>, "Eduardo Habkost" <ehabkost@redhat.com>, "Paul Durrant" <paul@xen.org>, "Michael S. Tsirkin" <mst@redhat.com>, "Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>, "Paolo Bonzini" <pbonzini@redhat.com>, "Anthony Perard" <anthony.perard@citrix.com>, xen-devel@lists.xenproject.org, "Richard Henderson" <rth@twiddle.net>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, "Roger Pau Monné" <roger.pau@citrix.com> Subject: [PATCH-for-5.2] hw/i386/q35: Remove unreachable Xen code on Q35 machine Date: Wed, 22 Jul 2020 10:25:17 +0200 [thread overview] Message-ID: <20200722082517.18708-1-philmd@redhat.com> (raw) Xen accelerator requires specific changes to a machine to be able to use it. See for example the 'Xen PC' machine configure its PCI bus calling pc_xen_hvm_init_pci(). There is no 'Xen Q35' machine declared. This code was probably added while introducing the Q35 machine, based on the existing PC machine (see commit df2d8b3ed4 "Introduce q35 pc based chipset emulator"). Remove the unreachable code to simplify this file. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- hw/i386/pc_q35.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a3e607a544..12f5934241 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -34,9 +34,7 @@ #include "sysemu/arch_init.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/xen/xen.h" #include "sysemu/kvm.h" -#include "sysemu/xen.h" #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" #include "hw/qdev-properties.h" @@ -179,10 +177,6 @@ static void pc_q35_init(MachineState *machine) x86ms->below_4g_mem_size = machine->ram_size; } - if (xen_enabled()) { - xen_hvm_init(pcms, &ram_memory); - } - x86_cpus_init(x86ms, pcmc->default_cpu_version); kvmclock_create(); @@ -208,10 +202,7 @@ static void pc_q35_init(MachineState *machine) } /* allocate ram and load rom/bios */ - if (!xen_enabled()) { - pc_memory_init(pcms, get_system_memory(), - rom_memory, &ram_memory); - } + pc_memory_init(pcms, get_system_memory(), rom_memory, &ram_memory); /* create pci host bus */ q35_host = Q35_HOST_DEVICE(qdev_new(TYPE_Q35_HOST_DEVICE)); @@ -271,7 +262,7 @@ static void pc_q35_init(MachineState *machine) assert(pcms->vmport != ON_OFF_AUTO__MAX); if (pcms->vmport == ON_OFF_AUTO_AUTO) { - pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; + pcms->vmport = ON_OFF_AUTO_ON; } /* init basic PC hardware */ -- 2.21.3
next reply other threads:[~2020-07-22 8:26 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-22 8:25 Philippe Mathieu-Daudé [this message] 2020-07-22 8:25 ` [PATCH-for-5.2] hw/i386/q35: Remove unreachable Xen code on Q35 machine Philippe Mathieu-Daudé 2020-08-11 10:55 ` Anthony PERARD via 2020-08-11 10:55 ` Anthony PERARD 2020-08-22 20:10 ` Philippe Mathieu-Daudé 2020-08-22 20:10 ` Philippe Mathieu-Daudé 2020-09-16 16:55 ` Paolo Bonzini 2020-09-16 16:55 ` Paolo Bonzini
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=20200722082517.18708-1-philmd@redhat.com \ --to=philmd@redhat.com \ --cc=anthony.perard@citrix.com \ --cc=ehabkost@redhat.com \ --cc=mst@redhat.com \ --cc=paul@xen.org \ --cc=pbonzini@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=roger.pau@citrix.com \ --cc=rth@twiddle.net \ --cc=sstabellini@kernel.org \ --cc=xen-devel@lists.xenproject.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.