qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.a@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, gleb@redhat.com, mst@redhat.com,
	hutao@cn.fujitsu.com, Marcel Apfelbaum <marcel.a@redhat.com>,
	kraxel@redhat.com, pbonzini@redhat.com, afaerber@suse.de,
	vrozenfe@redhat.com
Subject: [Qemu-devel] [PATCH for-1.6 V2 1/2] hw/misc: don't create pvpanic device by default
Date: Sun, 11 Aug 2013 18:10:42 +0300	[thread overview]
Message-ID: <1376233843-19410-2-git-send-email-marcel.a@redhat.com> (raw)
In-Reply-To: <1376233843-19410-1-git-send-email-marcel.a@redhat.com>

This patch is based on Hu Tao's:
http://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg00124.html

No need to hard-code pvpanic as part of the machine.
It can be added with "-device pvpanic" from command line (The next patch).
Anyway, for backport compatibility it is still part of 1.5
machine.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
---
Changes from v1:
 - Keep pvpanic device enabled by default for 1.5
   for backport compatibility

 hw/i386/pc_piix.c | 9 ++++-----
 hw/i386/pc_q35.c  | 7 ++++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ab25458..679d2e5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -56,7 +56,7 @@ static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
 static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
 static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
 
-static bool has_pvpanic = true;
+static bool has_pvpanic;
 static bool has_pci_info = true;
 
 /* PC hardware initialisation */
@@ -252,14 +252,15 @@ static void pc_init_pci(QEMUMachineInitArgs *args)
 static void pc_init_pci_1_5(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_pvpanic = true;
     pc_init_pci(args);
 }
 
 static void pc_init_pci_1_4(QEMUMachineInitArgs *args)
 {
-    has_pvpanic = false;
     x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
-    pc_init_pci_1_5(args);
+    has_pci_info = false;
+    pc_init_pci(args);
 }
 
 static void pc_init_pci_1_3(QEMUMachineInitArgs *args)
@@ -290,7 +291,6 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
     const char *kernel_cmdline = args->kernel_cmdline;
     const char *initrd_filename = args->initrd_filename;
     const char *boot_device = args->boot_device;
-    has_pvpanic = false;
     has_pci_info = false;
     disable_kvm_pv_eoi();
     enable_compat_apic_id_mode();
@@ -309,7 +309,6 @@ static void pc_init_isa(QEMUMachineInitArgs *args)
     const char *kernel_cmdline = args->kernel_cmdline;
     const char *initrd_filename = args->initrd_filename;
     const char *boot_device = args->boot_device;
-    has_pvpanic = false;
     has_pci_info = false;
     if (cpu_model == NULL)
         cpu_model = "486";
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 2f35d12..d2bb248 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -46,7 +46,7 @@
 /* ICH9 AHCI has 6 ports */
 #define MAX_SATA_PORTS     6
 
-static bool has_pvpanic = true;
+static bool has_pvpanic;
 static bool has_pci_info = true;
 
 /* PC hardware initialisation */
@@ -220,14 +220,15 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
 static void pc_q35_init_1_5(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_pvpanic = true;
     pc_q35_init(args);
 }
 
 static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
 {
-    has_pvpanic = false;
     x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
-    pc_q35_init_1_5(args);
+    has_pci_info = false;
+    pc_q35_init(args);
 }
 
 static QEMUMachine pc_q35_machine_v1_6 = {
-- 
1.8.3.1

  reply	other threads:[~2013-08-11 15:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-11 15:10 [Qemu-devel] [PATCH for-1.6 V2 0/2] pvpanic: Separate pvpanic from machine type Marcel Apfelbaum
2013-08-11 15:10 ` Marcel Apfelbaum [this message]
2013-08-12  3:06   ` [Qemu-devel] [PATCH for-1.6 V2 1/2] hw/misc: don't create pvpanic device by default Hu Tao
2013-08-12 15:59   ` Andreas Färber
2013-08-13 11:26   ` Markus Armbruster
2013-08-11 15:10 ` [Qemu-devel] [PATCH for-1.6 V2 2/2] hw/misc: make pvpanic known to user Marcel Apfelbaum
2013-08-12  3:07   ` Hu Tao
2013-08-12 15:53 ` [Qemu-devel] [PATCH for-1.6 V2 0/2] pvpanic: Separate pvpanic from machine type Eric Blake
2013-08-12 16:26   ` Marcel Apfelbaum
2013-08-14  7:02 ` Ronen Hod
2013-08-21  8:03   ` Marcel Apfelbaum
2013-08-21  8:18     ` Paolo Bonzini
2013-08-21  9:42       ` Michael S. Tsirkin
2013-08-21  9:56         ` Hu Tao
2013-08-21  9:59         ` Paolo Bonzini
2013-08-21 10:16           ` Michael S. Tsirkin
2013-08-21 10:37             ` Paolo Bonzini
2013-08-14 16: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=1376233843-19410-2-git-send-email-marcel.a@redhat.com \
    --to=marcel.a@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=gleb@redhat.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vrozenfe@redhat.com \
    /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).