qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/3] pc: use old default cpu type for 0.14 and 0.15


From: Alexander Graf
Subject: [Qemu-devel] [PATCH 2/3] pc: use old default cpu type for 0.14 and 0.15 compat machines
Date: Tue, 14 Jun 2011 17:29:48 +0200

When running with the 0.14 or 0.15 machine types, use the old mechanism
of determining the default CPU to choose, so that the guest sees the same
default CPU when running qemu in compat mode.

Signed-off-by: Alexander Graf <address@hidden>
---
 hw/pc_piix.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 3b3ef84..84d5650 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -220,6 +220,14 @@ static void pc_init_pci_014(ram_addr_t ram_size,
                             const char *initrd_filename,
                             const char *cpu_model)
 {
+    if (cpu_model == NULL) {
+#ifdef TARGET_X86_64
+        cpu_model = "qemu64";
+#else
+        cpu_model = "qemu32";
+#endif
+    }
+
     pc_init1(ram_size, boot_device,
              kernel_filename, kernel_cmdline,
              initrd_filename, cpu_model, 1, 1);
@@ -232,6 +240,14 @@ static void pc_init_pci_no_kvmclock(ram_addr_t ram_size,
                                     const char *initrd_filename,
                                     const char *cpu_model)
 {
+    if (cpu_model == NULL) {
+#ifdef TARGET_X86_64
+        cpu_model = "qemu64";
+#else
+        cpu_model = "qemu32";
+#endif
+    }
+
     pc_init1(ram_size, boot_device,
              kernel_filename, kernel_cmdline,
              initrd_filename, cpu_model, 1, 0);
-- 
1.7.3.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]