qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 4/4] q35: introduce q35-lite


From: Chao Peng
Subject: [Qemu-devel] [PATCH 4/4] q35: introduce q35-lite
Date: Sat, 5 Nov 2016 03:19:51 -0400

This patch introduces a light weight machine type which shares the
same codebase with existing q35 machine type but with some features
disabled by default.

Signed-off-by: Chao Peng <address@hidden>
---
 hw/i386/pc_q35.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index d042fe0..1c6b476 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -276,6 +276,15 @@ static void pc_q35_init(MachineState *machine)
     }
 }
 
+static void pc_q35_lite_init(MachineState *machine)
+{
+    PCMachineState *pcms = PC_MACHINE(machine);
+
+    pcms->smbus = false;
+    pcms->sata = false;
+    pcms->pit = false;
+}
+
 #define DEFINE_Q35_MACHINE(suffix, name, compatfn, optionfn) \
     static void pc_init_##suffix(MachineState *machine) \
     { \
@@ -301,6 +310,15 @@ static void pc_q35_machine_options(MachineClass *m)
     m->max_cpus = 288;
 }
 
+static void pc_q35_lite_machine_options(MachineClass *m)
+{
+    pc_q35_machine_options(m);
+    m->alias = "q35-lite";
+}
+
+DEFINE_Q35_MACHINE(lite, "pc-q35-lite", pc_q35_lite_init,
+                   pc_q35_lite_machine_options);
+
 static void pc_q35_2_8_machine_options(MachineClass *m)
 {
     pc_q35_machine_options(m);
-- 
1.8.3.1




reply via email to

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