* [Qemu-devel] [PATCH] pc: add 1.7 machine types for piix,q35
@ 2013-09-12 6:24 Michael S. Tsirkin
2013-09-12 12:24 ` Andreas Färber
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2013-09-12 6:24 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Eduardo Habkost, Andreas Färber,
Anthony Liguori, Michael S. Tsirkin
piix 1.7 is the default.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/pc_piix.c | 19 +++++++++++++++++--
hw/i386/pc_q35.c | 17 ++++++++++++++++-
2 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 66551b4..0ade373 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -274,6 +274,11 @@ static void pc_compat_1_2(QEMUMachineInitArgs *args)
disable_kvm_pv_eoi();
}
+static void pc_init_pci_1_7(QEMUMachineInitArgs *args)
+{
+ pc_init_pci(args);
+}
+
static void pc_init_pci_1_6(QEMUMachineInitArgs *args)
{
pc_compat_1_6(args);
@@ -344,14 +349,23 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
.desc = "Standard PC (i440FX + PIIX, 1996)", \
.hot_add_cpu = pc_hot_add_cpu
-#define PC_I440FX_1_6_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS
+#define PC_I440FX_1_7_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS
+
+static QEMUMachine pc_i440fx_machine_v1_7 = {
+ PC_I440FX_1_7_MACHINE_OPTIONS,
+ .name = "pc-i440fx-1.7",
+ .alias = "pc",
+ .init = pc_init_pci_1_7,
+ .is_default = 1,
+};
+
+#define PC_I440FX_1_6_MACHINE_OPTIONS PC_I440FX_1_7_MACHINE_OPTIONS
static QEMUMachine pc_i440fx_machine_v1_6 = {
PC_I440FX_1_6_MACHINE_OPTIONS,
.name = "pc-i440fx-1.6",
.alias = "pc",
.init = pc_init_pci_1_6,
- .is_default = 1,
};
static QEMUMachine pc_i440fx_machine_v1_5 = {
@@ -740,6 +754,7 @@ static QEMUMachine xenfv_machine = {
static void pc_machine_init(void)
{
+ qemu_register_machine(&pc_i440fx_machine_v1_7);
qemu_register_machine(&pc_i440fx_machine_v1_6);
qemu_register_machine(&pc_i440fx_machine_v1_5);
qemu_register_machine(&pc_i440fx_machine_v1_4);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 54c2b4c..0abd9b1 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -238,6 +238,11 @@ static void pc_compat_1_4(QEMUMachineInitArgs *args)
x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ);
}
+static void pc_q35_init_1_7(QEMUMachineInitArgs *args)
+{
+ pc_q35_init(args);
+}
+
static void pc_q35_init_1_6(QEMUMachineInitArgs *args)
{
pc_compat_1_6(args);
@@ -261,7 +266,16 @@ static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
.desc = "Standard PC (Q35 + ICH9, 2009)", \
.hot_add_cpu = pc_hot_add_cpu
-#define PC_Q35_1_6_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS
+#define PC_Q35_1_7_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS
+
+static QEMUMachine pc_q35_machine_v1_7 = {
+ PC_Q35_1_7_MACHINE_OPTIONS,
+ .name = "pc-q35-1.7",
+ .alias = "q35",
+ .init = pc_q35_init_1_7,
+};
+
+#define PC_Q35_1_6_MACHINE_OPTIONS PC_Q35_1_7_MACHINE_OPTIONS
static QEMUMachine pc_q35_machine_v1_6 = {
PC_Q35_1_6_MACHINE_OPTIONS,
@@ -296,6 +310,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {
static void pc_q35_machine_init(void)
{
+ qemu_register_machine(&pc_q35_machine_v1_7);
qemu_register_machine(&pc_q35_machine_v1_6);
qemu_register_machine(&pc_q35_machine_v1_5);
qemu_register_machine(&pc_q35_machine_v1_4);
--
MST
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] pc: add 1.7 machine types for piix,q35
2013-09-12 6:24 [Qemu-devel] [PATCH] pc: add 1.7 machine types for piix,q35 Michael S. Tsirkin
@ 2013-09-12 12:24 ` Andreas Färber
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Färber @ 2013-09-12 12:24 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Paolo Bonzini, Stefan Hajnoczi, qemu-devel, Anthony Liguori,
Eduardo Habkost
Am 12.09.2013 08:24, schrieb Michael S. Tsirkin:
> piix 1.7 is the default.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/i386/pc_piix.c | 19 +++++++++++++++++--
> hw/i386/pc_q35.c | 17 ++++++++++++++++-
> 2 files changed, 33 insertions(+), 3 deletions(-)
Looks like you forget to rebase? Stefan's net-next tree was merged last
night, so there's already the two _v1_7 machines registered at least.
The pc_init_ function and the 1_6 -> 1_7 #define might still be
applicable though.
Andreas
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 66551b4..0ade373 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -274,6 +274,11 @@ static void pc_compat_1_2(QEMUMachineInitArgs *args)
> disable_kvm_pv_eoi();
> }
>
> +static void pc_init_pci_1_7(QEMUMachineInitArgs *args)
> +{
> + pc_init_pci(args);
> +}
> +
> static void pc_init_pci_1_6(QEMUMachineInitArgs *args)
> {
> pc_compat_1_6(args);
> @@ -344,14 +349,23 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
> .desc = "Standard PC (i440FX + PIIX, 1996)", \
> .hot_add_cpu = pc_hot_add_cpu
>
> -#define PC_I440FX_1_6_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS
> +#define PC_I440FX_1_7_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS
> +
> +static QEMUMachine pc_i440fx_machine_v1_7 = {
> + PC_I440FX_1_7_MACHINE_OPTIONS,
> + .name = "pc-i440fx-1.7",
> + .alias = "pc",
> + .init = pc_init_pci_1_7,
> + .is_default = 1,
> +};
> +
> +#define PC_I440FX_1_6_MACHINE_OPTIONS PC_I440FX_1_7_MACHINE_OPTIONS
>
> static QEMUMachine pc_i440fx_machine_v1_6 = {
> PC_I440FX_1_6_MACHINE_OPTIONS,
> .name = "pc-i440fx-1.6",
> .alias = "pc",
> .init = pc_init_pci_1_6,
> - .is_default = 1,
> };
>
> static QEMUMachine pc_i440fx_machine_v1_5 = {
> @@ -740,6 +754,7 @@ static QEMUMachine xenfv_machine = {
>
> static void pc_machine_init(void)
> {
> + qemu_register_machine(&pc_i440fx_machine_v1_7);
> qemu_register_machine(&pc_i440fx_machine_v1_6);
> qemu_register_machine(&pc_i440fx_machine_v1_5);
> qemu_register_machine(&pc_i440fx_machine_v1_4);
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 54c2b4c..0abd9b1 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -238,6 +238,11 @@ static void pc_compat_1_4(QEMUMachineInitArgs *args)
> x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ);
> }
>
> +static void pc_q35_init_1_7(QEMUMachineInitArgs *args)
> +{
> + pc_q35_init(args);
> +}
> +
> static void pc_q35_init_1_6(QEMUMachineInitArgs *args)
> {
> pc_compat_1_6(args);
> @@ -261,7 +266,16 @@ static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
> .desc = "Standard PC (Q35 + ICH9, 2009)", \
> .hot_add_cpu = pc_hot_add_cpu
>
> -#define PC_Q35_1_6_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS
> +#define PC_Q35_1_7_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS
> +
> +static QEMUMachine pc_q35_machine_v1_7 = {
> + PC_Q35_1_7_MACHINE_OPTIONS,
> + .name = "pc-q35-1.7",
> + .alias = "q35",
> + .init = pc_q35_init_1_7,
> +};
> +
> +#define PC_Q35_1_6_MACHINE_OPTIONS PC_Q35_1_7_MACHINE_OPTIONS
>
> static QEMUMachine pc_q35_machine_v1_6 = {
> PC_Q35_1_6_MACHINE_OPTIONS,
> @@ -296,6 +310,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {
>
> static void pc_q35_machine_init(void)
> {
> + qemu_register_machine(&pc_q35_machine_v1_7);
> qemu_register_machine(&pc_q35_machine_v1_6);
> qemu_register_machine(&pc_q35_machine_v1_5);
> qemu_register_machine(&pc_q35_machine_v1_4);
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-12 12:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-12 6:24 [Qemu-devel] [PATCH] pc: add 1.7 machine types for piix,q35 Michael S. Tsirkin
2013-09-12 12:24 ` Andreas Färber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).