diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2013-08-21 15:14:43 -0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-08-21 23:30:22 +0300 |
commit | 89b439f3136644b07c2e25bb4ceeb9466ae23fe5 (patch) | |
tree | 77d8fd73e0a1e1f527fa656ea45a521b66e83241 /hw/i386/pc_q35.c | |
parent | 43a52ce65736adf9def7c2a9e5ba409814eb5dae (diff) |
pc: Create pc_compat_*() functions
Making the older compat functions call the newer compat functions at the
beginning allows the older functions undo what's done by newer compat
functions. e.g.: pc_compat_1_4() will be able to call pc_compat_1_5()
and then set has_pvpanic=false.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc_q35.c')
-rw-r--r-- | hw/i386/pc_q35.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 4847f464f6..f5e0b941e0 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -215,25 +215,42 @@ static void pc_q35_init(QEMUMachineInitArgs *args) } } -static void pc_q35_init_1_6(QEMUMachineInitArgs *args) +static void pc_compat_1_6(QEMUMachineInitArgs *args) { has_pci_info = false; rom_file_in_ram = false; - pc_q35_init(args); } -static void pc_q35_init_1_5(QEMUMachineInitArgs *args) +static void pc_compat_1_5(QEMUMachineInitArgs *args) { + pc_compat_1_6(args); has_pvpanic = true; - pc_q35_init_1_6(args); } -static void pc_q35_init_1_4(QEMUMachineInitArgs *args) +static void pc_compat_1_4(QEMUMachineInitArgs *args) { + /* 1.5 was special - it enabled pvpanic in builtin machine */ + pc_compat_1_6(args); x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE); x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ); - /* 1.5 was special - it enabled pvpanic in builtin machine */ - pc_q35_init_1_6(args); +} + +static void pc_q35_init_1_6(QEMUMachineInitArgs *args) +{ + pc_compat_1_6(args); + pc_q35_init(args); +} + +static void pc_q35_init_1_5(QEMUMachineInitArgs *args) +{ + pc_compat_1_5(args); + pc_q35_init(args); +} + +static void pc_q35_init_1_4(QEMUMachineInitArgs *args) +{ + pc_compat_1_4(args); + pc_q35_init(args); } static QEMUMachine pc_q35_machine_v1_6 = { |