From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmvxI-0001xD-Rz for qemu-devel@nongnu.org; Mon, 27 Apr 2015 23:13:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmvxH-0000ja-HK for qemu-devel@nongnu.org; Mon, 27 Apr 2015 23:13:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmvxH-0000jP-A3 for qemu-devel@nongnu.org; Mon, 27 Apr 2015 23:13:03 -0400 Date: Tue, 28 Apr 2015 11:12:50 +0800 From: Jason Wang Message-Id: <1430190770.9163.2@smtp.corp.redhat.com> In-Reply-To: <20150427130318-mutt-send-email-mst@redhat.com> References: <1429770109-23873-1-git-send-email-jasowang@redhat.com> <1429770109-23873-3-git-send-email-jasowang@redhat.com> <20150427130318-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Subject: Re: [Qemu-devel] [PATCH V7 02/16] pc: add 2.4 machine types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Paolo Bonzini , qemu-devel@nongnu.org, Richard Henderson On Mon, Apr 27, 2015 at 7:03 PM, Michael S. Tsirkin wrote: > On Thu, Apr 23, 2015 at 02:21:35PM +0800, Jason Wang wrote: >> 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 > > We dropped the auto size chunk so the commit log is > slightly wrong. Yes. > >> Cc: Paolo Bonzini >> Cc: Richard Henderson >> Cc: Michael S. Tsirkin >> Signed-off-by: Jason Wang >> --- >> hw/i386/pc_piix.c | 29 +++++++++++++++++++++++++---- >> hw/i386/pc_q35.c | 26 +++++++++++++++++++++++--- >> 2 files changed, 48 insertions(+), 7 deletions(-) >> >> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c >> index 1fe7bfb..212e263 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); >> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c >> index dcc17c0..e67f2de 100644 >> --- a/hw/i386/pc_q35.c >> +++ b/hw/i386/pc_q35.c >> @@ -289,8 +289,13 @@ static void pc_q35_init(MachineState *machine) >> } >> } >> >> +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); >> @@ -361,6 +366,12 @@ static void pc_compat_1_4(MachineState >> *machine) >> x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, >> CPUID_EXT_PCLMULQDQ); >> } >> >> +static void pc_q35_init_2_3(MachineState *machine) >> +{ >> + pc_compat_2_3(machine); >> + pc_q35_init(machine); >> +} >> + >> static void pc_q35_init_2_2(MachineState *machine) >> { >> pc_compat_2_2(machine); >> @@ -410,16 +421,24 @@ static void pc_q35_init_1_4(MachineState >> *machine) >> .hot_add_cpu = pc_hot_add_cpu, \ >> .units_per_default_bus = 1 >> >> -#define PC_Q35_2_3_MACHINE_OPTIONS \ >> +#define PC_Q35_2_4_MACHINE_OPTIONS \ >> PC_Q35_MACHINE_OPTIONS, \ >> .default_machine_opts = "firmware=bios-256k.bin", \ >> .default_display = "std" >> >> +static QEMUMachine pc_q35_machine_v2_4 = { >> + PC_Q35_2_4_MACHINE_OPTIONS, >> + .name = "pc-q35-2.4", >> + .alias = "q35", >> + .init = pc_q35_init, >> +}; >> + >> +#define PC_Q35_2_3_MACHINE_OPTIONS PC_Q35_2_4_MACHINE_OPTIONS >> + >> static QEMUMachine pc_q35_machine_v2_3 = { >> PC_Q35_2_3_MACHINE_OPTIONS, >> .name = "pc-q35-2.3", >> - .alias = "q35", >> - .init = pc_q35_init, >> + .init = pc_q35_init_2_3, >> }; >> >> #define PC_Q35_2_2_MACHINE_OPTIONS PC_Q35_2_3_MACHINE_OPTIONS >> @@ -506,6 +525,7 @@ static QEMUMachine pc_q35_machine_v1_4 = { >> >> static void pc_q35_machine_init(void) >> { >> + qemu_register_pc_machine(&pc_q35_machine_v2_4); >> qemu_register_pc_machine(&pc_q35_machine_v2_3); >> qemu_register_pc_machine(&pc_q35_machine_v2_2); >> qemu_register_pc_machine(&pc_q35_machine_v2_1); >> -- >> 2.1.0 >