qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/3] pc: add compat machine types for 0.14 and 0.15


From: Alexander Graf
Subject: [Qemu-devel] [PATCH 1/3] pc: add compat machine types for 0.14 and 0.15
Date: Tue, 14 Jun 2011 17:29:47 +0200

We change virtual hardware from time to time, so in order to ensure that
the guest doesn't get confused, we have compatibility machines for the PC
machine.

This patch adds compatibility definitions for 0.14 and 0.15 versions.

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

diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 9a22a8a..3b3ef84 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -213,6 +213,18 @@ static void pc_init_pci(ram_addr_t ram_size,
              initrd_filename, cpu_model, 1, 1);
 }
 
+static void pc_init_pci_014(ram_addr_t ram_size,
+                            const char *boot_device,
+                            const char *kernel_filename,
+                            const char *kernel_cmdline,
+                            const char *initrd_filename,
+                            const char *cpu_model)
+{
+    pc_init1(ram_size, boot_device,
+             kernel_filename, kernel_cmdline,
+             initrd_filename, cpu_model, 1, 1);
+}
+
 static void pc_init_pci_no_kvmclock(ram_addr_t ram_size,
                                     const char *boot_device,
                                     const char *kernel_filename,
@@ -258,7 +270,7 @@ static void pc_xen_hvm_init(ram_addr_t ram_size,
 #endif
 
 static QEMUMachine pc_machine = {
-    .name = "pc-0.14",
+    .name = "pc-0.16",
     .alias = "pc",
     .desc = "Standard PC",
     .init = pc_init_pci,
@@ -266,6 +278,22 @@ static QEMUMachine pc_machine = {
     .is_default = 1,
 };
 
+static QEMUMachine pc_machine_v0_15 = {
+    .name = "pc-0.15",
+    .desc = "Standard PC",
+    .init = pc_init_pci_014,
+    .max_cpus = 255,
+    .is_default = 1,
+};
+
+static QEMUMachine pc_machine_v0_14 = {
+    .name = "pc-0.14",
+    .desc = "Standard PC",
+    .init = pc_init_pci_014,
+    .max_cpus = 255,
+    .is_default = 1,
+};
+
 static QEMUMachine pc_machine_v0_13 = {
     .name = "pc-0.13",
     .desc = "Standard PC",
@@ -434,6 +462,8 @@ static QEMUMachine xenfv_machine = {
 static void pc_machine_init(void)
 {
     qemu_register_machine(&pc_machine);
+    qemu_register_machine(&pc_machine_v0_15);
+    qemu_register_machine(&pc_machine_v0_14);
     qemu_register_machine(&pc_machine_v0_13);
     qemu_register_machine(&pc_machine_v0_12);
     qemu_register_machine(&pc_machine_v0_11);
-- 
1.7.3.4




reply via email to

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