diff options
author | Jason Wang <jasowang@redhat.com> | 2015-04-23 14:21:35 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-04-27 20:49:46 +0200 |
commit | 5cb50e0acc7ba6063b87664404103cce217c0493 (patch) | |
tree | 20f21972c0af7d1316ed91e3e43b82d5d8b942fc /hw/i386/pc_piix.c | |
parent | 27a46dcf5038e20451101ed2d5414aebf3846e27 (diff) |
pc: add 2.4 machine types
The following patches will limit the following things to legacy
machine type:
- maximum number of virtqueues for virtio-pci were limited to 64
- auto msix bar size for virtio-net-pci were disabled by default
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc_piix.c')
-rw-r--r-- | hw/i386/pc_piix.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 1fe7bfb29a..212e263404 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -310,8 +310,13 @@ static void pc_init_pci(MachineState *machine) pc_init1(machine, 1, 1); } +static void pc_compat_2_3(MachineState *machine) +{ +} + static void pc_compat_2_2(MachineState *machine) { + pc_compat_2_3(machine); rsdp_in_ram = false; x86_cpu_compat_set_features("kvm64", FEAT_1_EDX, 0, CPUID_VME); x86_cpu_compat_set_features("kvm32", FEAT_1_EDX, 0, CPUID_VME); @@ -413,6 +418,12 @@ static void pc_compat_1_2(MachineState *machine) x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI); } +static void pc_init_pci_2_3(MachineState *machine) +{ + pc_compat_2_3(machine); + pc_init_pci(machine); +} + static void pc_init_pci_2_2(MachineState *machine) { pc_compat_2_2(machine); @@ -512,19 +523,28 @@ static void pc_xen_hvm_init(MachineState *machine) .desc = "Standard PC (i440FX + PIIX, 1996)", \ .hot_add_cpu = pc_hot_add_cpu -#define PC_I440FX_2_3_MACHINE_OPTIONS \ +#define PC_I440FX_2_4_MACHINE_OPTIONS \ PC_I440FX_MACHINE_OPTIONS, \ .default_machine_opts = "firmware=bios-256k.bin", \ .default_display = "std" -static QEMUMachine pc_i440fx_machine_v2_3 = { - PC_I440FX_2_3_MACHINE_OPTIONS, - .name = "pc-i440fx-2.3", + +static QEMUMachine pc_i440fx_machine_v2_4 = { + PC_I440FX_2_4_MACHINE_OPTIONS, + .name = "pc-i440fx-2.4", .alias = "pc", .init = pc_init_pci, .is_default = 1, }; +#define PC_I440FX_2_3_MACHINE_OPTIONS PC_I440FX_2_4_MACHINE_OPTIONS + +static QEMUMachine pc_i440fx_machine_v2_3 = { + PC_I440FX_2_3_MACHINE_OPTIONS, + .name = "pc-i440fx-2.3", + .init = pc_init_pci_2_3, +}; + #define PC_I440FX_2_2_MACHINE_OPTIONS PC_I440FX_2_3_MACHINE_OPTIONS static QEMUMachine pc_i440fx_machine_v2_2 = { @@ -970,6 +990,7 @@ static QEMUMachine xenfv_machine = { static void pc_machine_init(void) { + qemu_register_pc_machine(&pc_i440fx_machine_v2_4); qemu_register_pc_machine(&pc_i440fx_machine_v2_3); qemu_register_pc_machine(&pc_i440fx_machine_v2_2); qemu_register_pc_machine(&pc_i440fx_machine_v2_1); |