* [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros
@ 2015-05-14 18:52 Eduardo Habkost
2015-05-14 18:52 ` [Qemu-devel] [PATCH v2 01/13] pc: Replace tab with spaces Eduardo Habkost
` (12 more replies)
0 siblings, 13 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:52 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
This series does some changes to make the macros more consistent. Now every pc
and pseries version has a corresponding compat macro defined.
Changes v1 -> v2:
* Rebase after the new PC 2.4 machine-types were added
Eduardo Habkost (13):
pc: Replace tab with spaces
hw: Move commas inside HW_COMPAT_2_1 macro
pc: Move commas inside PC_COMPAT_* macros
spapr: Move commas inside SPAPR_COMPAT_* macros
hw: Define empty HW_COMPAT_2_[23] macros
pc: Define PC_COMPAT_2_[123] macros
spapr: Use HW_COMPAT_* inside SPAPR_COMPAT_* macros
spapr: define SPAPR_COMPAT_2_3
piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14
piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11
piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13
piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13
piix: Define PC_COMPAT_0_10
hw/i386/pc_piix.c | 185 +++++++++++++++++++++++++--------------------------
hw/i386/pc_q35.c | 20 ++++--
hw/ppc/spapr.c | 15 +++--
include/hw/compat.h | 8 ++-
include/hw/i386/pc.h | 43 +++++++-----
5 files changed, 150 insertions(+), 121 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 01/13] pc: Replace tab with spaces
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
@ 2015-05-14 18:52 ` Eduardo Habkost
2015-05-14 18:52 ` [Qemu-devel] [PATCH v2 02/13] hw: Move commas inside HW_COMPAT_2_1 macro Eduardo Habkost
` (11 subsequent siblings)
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:52 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
Coding style change only.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 2 +-
include/hw/i386/pc.h | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 212e263..a8ff6f5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -628,7 +628,7 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
};
#define PC_COMPAT_1_3 \
- PC_COMPAT_1_4, \
+ PC_COMPAT_1_4, \
{\
.driver = "usb-tablet",\
.property = "usb_version",\
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 1b35168..7ed43f1 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -447,23 +447,23 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "scsi-hd",\
.property = "discard_granularity",\
.value = stringify(0),\
- },{\
+ },{\
.driver = "scsi-cd",\
.property = "discard_granularity",\
.value = stringify(0),\
- },{\
+ },{\
.driver = "scsi-disk",\
.property = "discard_granularity",\
.value = stringify(0),\
- },{\
+ },{\
.driver = "ide-hd",\
.property = "discard_granularity",\
.value = stringify(0),\
- },{\
+ },{\
.driver = "ide-cd",\
.property = "discard_granularity",\
.value = stringify(0),\
- },{\
+ },{\
.driver = "ide-drive",\
.property = "discard_granularity",\
.value = stringify(0),\
@@ -471,7 +471,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "virtio-blk-pci",\
.property = "discard_granularity",\
.value = stringify(0),\
- },{\
+ },{\
.driver = "virtio-serial-pci",\
.property = "vectors",\
/* DEV_NVECTORS_UNSPECIFIED as a uint32_t string */\
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 02/13] hw: Move commas inside HW_COMPAT_2_1 macro
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
2015-05-14 18:52 ` [Qemu-devel] [PATCH v2 01/13] pc: Replace tab with spaces Eduardo Habkost
@ 2015-05-14 18:52 ` Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 03/13] pc: Move commas inside PC_COMPAT_* macros Eduardo Habkost
` (10 subsequent siblings)
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:52 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
Changing the convention to include commas inside the macros will allow
macros containing empty lists to be defined and used without compilation
errors.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 2 +-
hw/i386/pc_q35.c | 2 +-
hw/ppc/spapr.c | 2 +-
include/hw/compat.h | 2 +-
include/hw/i386/pc.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index a8ff6f5..608539d 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -562,7 +562,7 @@ static QEMUMachine pc_i440fx_machine_v2_1 = {
.name = "pc-i440fx-2.1",
.init = pc_init_pci_2_1,
.compat_props = (GlobalProperty[]) {
- HW_COMPAT_2_1,
+ HW_COMPAT_2_1
{ /* end of list */ }
},
};
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index e67f2de..36b8834 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -458,7 +458,7 @@ static QEMUMachine pc_q35_machine_v2_1 = {
.name = "pc-q35-2.1",
.init = pc_q35_init_2_1,
.compat_props = (GlobalProperty[]) {
- HW_COMPAT_2_1,
+ HW_COMPAT_2_1
{ /* end of list */ }
},
};
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index ac261ef..f768de1 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1861,7 +1861,7 @@ static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
static GlobalProperty compat_props[] = {
- HW_COMPAT_2_1,
+ HW_COMPAT_2_1
SPAPR_COMPAT_2_1,
{ /* end of list */ }
};
diff --git a/include/hw/compat.h b/include/hw/compat.h
index 313682a..c56a698 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -30,6 +30,6 @@
.driver = "virtio-pci",\
.property = "virtio-pci-bus-master-bug-migration",\
.value = "on",\
- }
+ },
#endif /* HW_COMPAT_H */
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 7ed43f1..7673a4d 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -296,7 +296,7 @@ int e820_get_num_entries(void);
bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
#define PC_COMPAT_2_0 \
- HW_COMPAT_2_1, \
+ HW_COMPAT_2_1 \
{\
.driver = "virtio-scsi-pci",\
.property = "any_layout",\
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 03/13] pc: Move commas inside PC_COMPAT_* macros
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
2015-05-14 18:52 ` [Qemu-devel] [PATCH v2 01/13] pc: Replace tab with spaces Eduardo Habkost
2015-05-14 18:52 ` [Qemu-devel] [PATCH v2 02/13] hw: Move commas inside HW_COMPAT_2_1 macro Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 04/13] spapr: Move commas inside SPAPR_COMPAT_* macros Eduardo Habkost
` (9 subsequent siblings)
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
Changing the convention to include commas inside the macros will allow
macros containing empty lists to be defined and used without compilation
errors.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 62 ++++++++++++++++++++++++++--------------------------
hw/i386/pc_q35.c | 10 ++++-----
include/hw/i386/pc.h | 18 +++++++--------
3 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 608539d..25da8a5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -574,7 +574,7 @@ static QEMUMachine pc_i440fx_machine_v2_0 = {
.name = "pc-i440fx-2.0",
.init = pc_init_pci_2_0,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_2_0,
+ PC_COMPAT_2_0
{ /* end of list */ }
},
};
@@ -586,7 +586,7 @@ static QEMUMachine pc_i440fx_machine_v1_7 = {
.name = "pc-i440fx-1.7",
.init = pc_init_pci_1_7,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_7,
+ PC_COMPAT_1_7
{ /* end of list */ }
},
};
@@ -598,7 +598,7 @@ static QEMUMachine pc_i440fx_machine_v1_6 = {
.name = "pc-i440fx-1.6",
.init = pc_init_pci_1_6,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_6,
+ PC_COMPAT_1_6
{ /* end of list */ }
},
};
@@ -608,7 +608,7 @@ static QEMUMachine pc_i440fx_machine_v1_5 = {
.name = "pc-i440fx-1.5",
.init = pc_init_pci_1_5,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_5,
+ PC_COMPAT_1_5
{ /* end of list */ }
},
};
@@ -622,13 +622,13 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
.name = "pc-i440fx-1.4",
.init = pc_init_pci_1_4,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_4,
+ PC_COMPAT_1_4
{ /* end of list */ }
},
};
#define PC_COMPAT_1_3 \
- PC_COMPAT_1_4, \
+ PC_COMPAT_1_4 \
{\
.driver = "usb-tablet",\
.property = "usb_version",\
@@ -645,20 +645,20 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
.driver = "e1000",\
.property = "autonegotiation",\
.value = "off",\
- }
+ },
static QEMUMachine pc_machine_v1_3 = {
PC_I440FX_1_4_MACHINE_OPTIONS,
.name = "pc-1.3",
.init = pc_init_pci_1_3,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_3,
+ PC_COMPAT_1_3
{ /* end of list */ }
},
};
#define PC_COMPAT_1_2 \
- PC_COMPAT_1_3,\
+ PC_COMPAT_1_3 \
{\
.driver = "nec-usb-xhci",\
.property = "msi",\
@@ -683,7 +683,7 @@ static QEMUMachine pc_machine_v1_3 = {
.driver = "VGA",\
.property = "mmio",\
.value = "off",\
- }
+ },
#define PC_I440FX_1_2_MACHINE_OPTIONS \
PC_I440FX_1_4_MACHINE_OPTIONS, \
@@ -693,13 +693,13 @@ static QEMUMachine pc_machine_v1_2 = {
PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-1.2",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_2,
+ PC_COMPAT_1_2
{ /* end of list */ }
},
};
#define PC_COMPAT_1_1 \
- PC_COMPAT_1_2,\
+ PC_COMPAT_1_2 \
{\
.driver = "virtio-scsi-pci",\
.property = "hotplug",\
@@ -728,19 +728,19 @@ static QEMUMachine pc_machine_v1_2 = {
.driver = "virtio-blk-pci",\
.property = "config-wce",\
.value = "off",\
- }
+ },
static QEMUMachine pc_machine_v1_1 = {
PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-1.1",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_1,
+ PC_COMPAT_1_1
{ /* end of list */ }
},
};
#define PC_COMPAT_1_0 \
- PC_COMPAT_1_1,\
+ PC_COMPAT_1_1 \
{\
.driver = TYPE_ISA_FDC,\
.property = "check_media_rate",\
@@ -757,13 +757,13 @@ static QEMUMachine pc_machine_v1_1 = {
.driver = TYPE_USB_DEVICE,\
.property = "full-path",\
.value = "no",\
- }
+ },
static QEMUMachine pc_machine_v1_0 = {
PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-1.0",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_0,
+ PC_COMPAT_1_0
{ /* end of list */ }
},
.hw_version = "1.0",
@@ -776,14 +776,14 @@ static QEMUMachine pc_machine_v0_15 = {
PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-0.15",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_0_15,
+ PC_COMPAT_0_15
{ /* end of list */ }
},
.hw_version = "0.15",
};
#define PC_COMPAT_0_14 \
- PC_COMPAT_0_15,\
+ PC_COMPAT_0_15 \
{\
.driver = "virtio-blk-pci",\
.property = "event_idx",\
@@ -800,13 +800,13 @@ static QEMUMachine pc_machine_v0_15 = {
.driver = "virtio-balloon-pci",\
.property = "event_idx",\
.value = "off",\
- }
+ },
static QEMUMachine pc_machine_v0_14 = {
PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-0.14",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_0_14,
+ PC_COMPAT_0_14
{
.driver = "qxl",
.property = "revision",
@@ -822,7 +822,7 @@ static QEMUMachine pc_machine_v0_14 = {
};
#define PC_COMPAT_0_13 \
- PC_COMPAT_0_14,\
+ PC_COMPAT_0_14 \
{\
.driver = TYPE_PCI_DEVICE,\
.property = "command_serr_enable",\
@@ -831,7 +831,7 @@ static QEMUMachine pc_machine_v0_14 = {
.driver = "AC97",\
.property = "use_broken_id",\
.value = stringify(1),\
- }
+ },
#define PC_I440FX_0_13_MACHINE_OPTIONS \
PC_I440FX_1_2_MACHINE_OPTIONS, \
@@ -841,7 +841,7 @@ static QEMUMachine pc_machine_v0_13 = {
PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.13",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_0_13,
+ PC_COMPAT_0_13
{
.driver = "virtio-9p-pci",
.property = "vectors",
@@ -861,7 +861,7 @@ static QEMUMachine pc_machine_v0_13 = {
};
#define PC_COMPAT_0_12 \
- PC_COMPAT_0_13,\
+ PC_COMPAT_0_13 \
{\
.driver = "virtio-serial-pci",\
.property = "max_ports",\
@@ -882,13 +882,13 @@ static QEMUMachine pc_machine_v0_13 = {
.driver = "usb-kbd",\
.property = "serial",\
.value = "1",\
- }
+ },
static QEMUMachine pc_machine_v0_12 = {
PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.12",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_0_12,
+ PC_COMPAT_0_12
{
.driver = "VGA",
.property = "rombar",
@@ -904,7 +904,7 @@ static QEMUMachine pc_machine_v0_12 = {
};
#define PC_COMPAT_0_11 \
- PC_COMPAT_0_12,\
+ PC_COMPAT_0_12 \
{\
.driver = "virtio-blk-pci",\
.property = "vectors",\
@@ -913,13 +913,13 @@ static QEMUMachine pc_machine_v0_12 = {
.driver = TYPE_PCI_DEVICE,\
.property = "rombar",\
.value = stringify(0),\
- }
+ },
static QEMUMachine pc_machine_v0_11 = {
PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.11",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_0_11,
+ PC_COMPAT_0_11
{
.driver = "ide-drive",
.property = "ver",
@@ -938,7 +938,7 @@ static QEMUMachine pc_machine_v0_10 = {
PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.10",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_0_11,
+ PC_COMPAT_0_11
{
.driver = "virtio-blk-pci",
.property = "class",
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 36b8834..d0d70e8 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -470,7 +470,7 @@ static QEMUMachine pc_q35_machine_v2_0 = {
.name = "pc-q35-2.0",
.init = pc_q35_init_2_0,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_2_0,
+ PC_COMPAT_2_0
{ /* end of list */ }
},
};
@@ -482,7 +482,7 @@ static QEMUMachine pc_q35_machine_v1_7 = {
.name = "pc-q35-1.7",
.init = pc_q35_init_1_7,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_7,
+ PC_COMPAT_1_7
{ /* end of list */ }
},
};
@@ -494,7 +494,7 @@ static QEMUMachine pc_q35_machine_v1_6 = {
.name = "pc-q35-1.6",
.init = pc_q35_init_1_6,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_6,
+ PC_COMPAT_1_6
{ /* end of list */ }
},
};
@@ -504,7 +504,7 @@ static QEMUMachine pc_q35_machine_v1_5 = {
.name = "pc-q35-1.5",
.init = pc_q35_init_1_5,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_5,
+ PC_COMPAT_1_5
{ /* end of list */ }
},
};
@@ -518,7 +518,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {
.name = "pc-q35-1.4",
.init = pc_q35_init_1_4,
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_1_4,
+ PC_COMPAT_1_4
{ /* end of list */ }
},
};
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 7673a4d..ab862e3 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -353,10 +353,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "ioh3420",\
.property = COMPAT_PROP_PCP,\
.value = "off",\
- }
+ },
#define PC_COMPAT_1_7 \
- PC_COMPAT_2_0, \
+ PC_COMPAT_2_0 \
{\
.driver = TYPE_USB_DEVICE,\
.property = "msos-desc",\
@@ -371,10 +371,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "hpet",\
.property = HPET_INTCAP,\
.value = stringify(4),\
- }
+ },
#define PC_COMPAT_1_6 \
- PC_COMPAT_1_7, \
+ PC_COMPAT_1_7 \
{\
.driver = "e1000",\
.property = "mitigation",\
@@ -395,10 +395,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "q35-pcihost",\
.property = "short_root_bus",\
.value = stringify(1),\
- }
+ },
#define PC_COMPAT_1_5 \
- PC_COMPAT_1_6, \
+ PC_COMPAT_1_6 \
{\
.driver = "Conroe-" TYPE_X86_CPU,\
.property = "model",\
@@ -439,10 +439,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "q35-pcihost",\
.property = "short_root_bus",\
.value = stringify(0),\
- }
+ },
#define PC_COMPAT_1_4 \
- PC_COMPAT_1_5, \
+ PC_COMPAT_1_5 \
{\
.driver = "scsi-hd",\
.property = "discard_granularity",\
@@ -504,7 +504,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "486-" TYPE_X86_CPU,\
.property = "model",\
.value = stringify(0),\
- }
+ },
#define PC_COMMON_MACHINE_OPTIONS \
.default_boot_order = "cad"
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 04/13] spapr: Move commas inside SPAPR_COMPAT_* macros
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (2 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 03/13] pc: Move commas inside PC_COMPAT_* macros Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 05/13] hw: Define empty HW_COMPAT_2_[23] macros Eduardo Habkost
` (8 subsequent siblings)
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
Changing the convention to include commas inside the macros will allow
macros containing empty lists to be defined and used without compilation
errors.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/ppc/spapr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index f768de1..ee0ec61 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1820,7 +1820,7 @@ static const TypeInfo spapr_machine_info = {
.driver = TYPE_SPAPR_PCI_HOST_BRIDGE,\
.property = "mem_win_size",\
.value = "0x20000000",\
- }
+ },
#define SPAPR_COMPAT_2_1 \
SPAPR_COMPAT_2_2
@@ -1862,7 +1862,7 @@ static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
static GlobalProperty compat_props[] = {
HW_COMPAT_2_1
- SPAPR_COMPAT_2_1,
+ SPAPR_COMPAT_2_1
{ /* end of list */ }
};
@@ -1881,7 +1881,7 @@ static const TypeInfo spapr_machine_2_1_info = {
static void spapr_machine_2_2_class_init(ObjectClass *oc, void *data)
{
static GlobalProperty compat_props[] = {
- SPAPR_COMPAT_2_2,
+ SPAPR_COMPAT_2_2
{ /* end of list */ }
};
MachineClass *mc = MACHINE_CLASS(oc);
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 05/13] hw: Define empty HW_COMPAT_2_[23] macros
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (3 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 04/13] spapr: Move commas inside SPAPR_COMPAT_* macros Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 06/13] pc: Define PC_COMPAT_2_[123] macros Eduardo Habkost
` (7 subsequent siblings)
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
Now we can make everything consistent and define the macros even if they
are still empty.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
include/hw/compat.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/hw/compat.h b/include/hw/compat.h
index c56a698..4a43466 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -1,6 +1,12 @@
#ifndef HW_COMPAT_H
#define HW_COMPAT_H
+#define HW_COMPAT_2_3 \
+ /* empty */
+
+#define HW_COMPAT_2_2 \
+ /* empty */
+
#define HW_COMPAT_2_1 \
{\
.driver = "intel-hda",\
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 06/13] pc: Define PC_COMPAT_2_[123] macros
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (4 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 05/13] hw: Define empty HW_COMPAT_2_[23] macros Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 07/13] spapr: Use HW_COMPAT_* inside SPAPR_COMPAT_* macros Eduardo Habkost
` (6 subsequent siblings)
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
Once we start adding compat code for pc-2.3, the usage of HW_COMPAT_2_1
in pc-*-2.2 won't be enough, as it also has to include PC_COMPAT_2_3
inside it. To ensure that, define PC_COMPAT_2_3, PC_COMPAT_2_2, and
PC_COMPAT_2_1 macros.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 10 +++++++++-
hw/i386/pc_q35.c | 10 +++++++++-
include/hw/i386/pc.h | 13 ++++++++++++-
3 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 25da8a5..8796e60 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -543,6 +543,10 @@ static QEMUMachine pc_i440fx_machine_v2_3 = {
PC_I440FX_2_3_MACHINE_OPTIONS,
.name = "pc-i440fx-2.3",
.init = pc_init_pci_2_3,
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_2_3
+ { /* end of list */ }
+ },
};
#define PC_I440FX_2_2_MACHINE_OPTIONS PC_I440FX_2_3_MACHINE_OPTIONS
@@ -551,6 +555,10 @@ static QEMUMachine pc_i440fx_machine_v2_2 = {
PC_I440FX_2_2_MACHINE_OPTIONS,
.name = "pc-i440fx-2.2",
.init = pc_init_pci_2_2,
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_2_2
+ { /* end of list */ }
+ },
};
#define PC_I440FX_2_1_MACHINE_OPTIONS \
@@ -562,7 +570,7 @@ static QEMUMachine pc_i440fx_machine_v2_1 = {
.name = "pc-i440fx-2.1",
.init = pc_init_pci_2_1,
.compat_props = (GlobalProperty[]) {
- HW_COMPAT_2_1
+ PC_COMPAT_2_1
{ /* end of list */ }
},
};
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index d0d70e8..0051666 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -439,6 +439,10 @@ static QEMUMachine pc_q35_machine_v2_3 = {
PC_Q35_2_3_MACHINE_OPTIONS,
.name = "pc-q35-2.3",
.init = pc_q35_init_2_3,
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_2_3
+ { /* end of list */ }
+ },
};
#define PC_Q35_2_2_MACHINE_OPTIONS PC_Q35_2_3_MACHINE_OPTIONS
@@ -447,6 +451,10 @@ static QEMUMachine pc_q35_machine_v2_2 = {
PC_Q35_2_2_MACHINE_OPTIONS,
.name = "pc-q35-2.2",
.init = pc_q35_init_2_2,
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_2_2
+ { /* end of list */ }
+ },
};
#define PC_Q35_2_1_MACHINE_OPTIONS \
@@ -458,7 +466,7 @@ static QEMUMachine pc_q35_machine_v2_1 = {
.name = "pc-q35-2.1",
.init = pc_q35_init_2_1,
.compat_props = (GlobalProperty[]) {
- HW_COMPAT_2_1
+ PC_COMPAT_2_1
{ /* end of list */ }
},
};
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index ab862e3..672f1f7 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -295,8 +295,19 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
int e820_get_num_entries(void);
bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
+#define PC_COMPAT_2_3 \
+ HW_COMPAT_2_3
+
+#define PC_COMPAT_2_2 \
+ PC_COMPAT_2_3 \
+ HW_COMPAT_2_2
+
+#define PC_COMPAT_2_1 \
+ PC_COMPAT_2_2 \
+ HW_COMPAT_2_1
+
#define PC_COMPAT_2_0 \
- HW_COMPAT_2_1 \
+ PC_COMPAT_2_1 \
{\
.driver = "virtio-scsi-pci",\
.property = "any_layout",\
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 07/13] spapr: Use HW_COMPAT_* inside SPAPR_COMPAT_* macros
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (5 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 06/13] pc: Define PC_COMPAT_2_[123] macros Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 08/13] spapr: define SPAPR_COMPAT_2_3 Eduardo Habkost
` (5 subsequent siblings)
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
SPAPR_COMPAT_2_1 will need to include both HW_COMPAT_2_2 and
HW_COMPAT_2_1, so include HW_COMPAT_2_1 inside SPAPR_COMPAT_2_1 and
HW_COMPAT_2_2 inside SPAPR_COMPAT_2_2.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/ppc/spapr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index ee0ec61..de1b740 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1816,6 +1816,7 @@ static const TypeInfo spapr_machine_info = {
};
#define SPAPR_COMPAT_2_2 \
+ HW_COMPAT_2_2 \
{\
.driver = TYPE_SPAPR_PCI_HOST_BRIDGE,\
.property = "mem_win_size",\
@@ -1823,7 +1824,8 @@ static const TypeInfo spapr_machine_info = {
},
#define SPAPR_COMPAT_2_1 \
- SPAPR_COMPAT_2_2
+ SPAPR_COMPAT_2_2 \
+ HW_COMPAT_2_1
static void spapr_compat_2_3(Object *obj)
{
@@ -1861,7 +1863,6 @@ static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
static GlobalProperty compat_props[] = {
- HW_COMPAT_2_1
SPAPR_COMPAT_2_1
{ /* end of list */ }
};
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 08/13] spapr: define SPAPR_COMPAT_2_3
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (6 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 07/13] spapr: Use HW_COMPAT_* inside SPAPR_COMPAT_* macros Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 09/13] piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14 Eduardo Habkost
` (4 subsequent siblings)
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
Don't add the pseries-2.3 machine yet, but define the corresponding
SPAPR_COMPAT macro to make sure both pseries-2.2 and pseries-2.1 will
inherit HW_COMPAT_2_3.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/ppc/spapr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index de1b740..a15fa3c 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1815,7 +1815,11 @@ static const TypeInfo spapr_machine_info = {
},
};
+#define SPAPR_COMPAT_2_3 \
+ HW_COMPAT_2_3
+
#define SPAPR_COMPAT_2_2 \
+ SPAPR_COMPAT_2_3 \
HW_COMPAT_2_2 \
{\
.driver = TYPE_SPAPR_PCI_HOST_BRIDGE,\
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 09/13] piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (7 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 08/13] spapr: define SPAPR_COMPAT_2_3 Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-18 7:35 ` Gerd Hoffmann
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 10/13] piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11 Eduardo Habkost
` (3 subsequent siblings)
12 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc,
Gerd Hoffmann, pbonzini, rth
Those properties were introduced by commit
3827cdb1c3aa17a792d1658161195b9d7173c26b. They were not duplicated into
pc-0.13 and older because 0.14 was the first QEMU version supporting
qxl. The only problem is that this breaks the PC_COMPAT_* nesting
pattern we currently use.
So, move the properties to PC_COMPAT_0_14. This makes pc-0.13 and older
inherit them, but that shouldn't be an issue as QEMU 0.13 didn't support
qxl.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 8796e60..1e12eff 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -808,6 +808,14 @@ static QEMUMachine pc_machine_v0_15 = {
.driver = "virtio-balloon-pci",\
.property = "event_idx",\
.value = "off",\
+ },{\
+ .driver = "qxl",\
+ .property = "revision",\
+ .value = stringify(2),\
+ },{\
+ .driver = "qxl-vga",\
+ .property = "revision",\
+ .value = stringify(2),\
},
static QEMUMachine pc_machine_v0_14 = {
@@ -815,15 +823,6 @@ static QEMUMachine pc_machine_v0_14 = {
.name = "pc-0.14",
.compat_props = (GlobalProperty[]) {
PC_COMPAT_0_14
- {
- .driver = "qxl",
- .property = "revision",
- .value = stringify(2),
- },{
- .driver = "qxl-vga",
- .property = "revision",
- .value = stringify(2),
- },
{ /* end of list */ }
},
.hw_version = "0.14",
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 10/13] piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (8 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 09/13] piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14 Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-18 7:35 ` Gerd Hoffmann
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 11/13] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13 Eduardo Habkost
` (2 subsequent siblings)
12 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc,
Gerd Hoffmann, pbonzini, rth
The current code setting ide-drive.ver and scsi-disk.ver on pc-0.11
breaks the PC_COMPAT_* nesting pattern we currently use.
As those variables are overwritten in pc-0.10 too, they can be inherited
by pc-0.10 with no side-effects at all.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 1e12eff..eb0c11f 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -920,6 +920,14 @@ static QEMUMachine pc_machine_v0_12 = {
.driver = TYPE_PCI_DEVICE,\
.property = "rombar",\
.value = stringify(0),\
+ },{\
+ .driver = "ide-drive",\
+ .property = "ver",\
+ .value = "0.11",\
+ },{\
+ .driver = "scsi-disk",\
+ .property = "ver",\
+ .value = "0.11",\
},
static QEMUMachine pc_machine_v0_11 = {
@@ -927,15 +935,6 @@ static QEMUMachine pc_machine_v0_11 = {
.name = "pc-0.11",
.compat_props = (GlobalProperty[]) {
PC_COMPAT_0_11
- {
- .driver = "ide-drive",
- .property = "ver",
- .value = "0.11",
- },{
- .driver = "scsi-disk",
- .property = "ver",
- .value = "0.11",
- },
{ /* end of list */ }
},
.hw_version = "0.11",
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 11/13] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (9 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 10/13] piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11 Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-18 7:36 ` Gerd Hoffmann
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 12/13] piix: Move pc-0.1[23] rombar compat props " Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 13/13] piix: Define PC_COMPAT_0_10 Eduardo Habkost
12 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Aneesh Kumar K.V, jasowang, Alexander Graf,
qemu-ppc, Gerd Hoffmann, pbonzini, rth
The compat property was added by commit
9dbcca5aa13cb9ab40788ac4c56bc227d94ca920, and the pc-0.12 and older
machine-types were not changed because virtio-9p-pci was introduced on QEMU
0.13 (commit 9f10751365b26b13b8a9b67e0e90536ae3d282df). The only problem is
that this breaks the PC_COMPAT_* nesting pattern we currently use.
So, move the property to PC_COMPAT_0_13. This make pc-0.12 and older inherit
it, but that shouldn't be an issue as QEMU 0.12 didn't have virtio-9p-pci.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index eb0c11f..9d12c93 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -838,6 +838,10 @@ static QEMUMachine pc_machine_v0_14 = {
.driver = "AC97",\
.property = "use_broken_id",\
.value = stringify(1),\
+ },{\
+ .driver = "virtio-9p-pci",\
+ .property = "vectors",\
+ .value = stringify(0),\
},
#define PC_I440FX_0_13_MACHINE_OPTIONS \
@@ -850,10 +854,6 @@ static QEMUMachine pc_machine_v0_13 = {
.compat_props = (GlobalProperty[]) {
PC_COMPAT_0_13
{
- .driver = "virtio-9p-pci",
- .property = "vectors",
- .value = stringify(0),
- },{
.driver = "VGA",
.property = "rombar",
.value = stringify(0),
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 12/13] piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (10 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 11/13] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13 Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
2015-05-18 7:37 ` Gerd Hoffmann
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 13/13] piix: Define PC_COMPAT_0_10 Eduardo Habkost
12 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, Stefan Weil, jasowang, Alexander Graf,
qemu-ppc, Gerd Hoffmann, pbonzini, rth
The VGA and vmware-svga rombar compat properties were added by commit
281a26b15b4adcecb8604216738975abd754bea8, but only to pc-0.13 and
pc-0.12. This breaks the PC_COMPAT_* nesting pattern we currently
follow.
The new variables will now be inherited by pc-0.11 and older, but
pc-0.11 and pc-0.10 already have PCI.rombar=0 on compat_props, so they
shouldn't be affected at all.
Cc: Stefan Weil <sw@weilnetz.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 9d12c93..ac98af1 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -842,6 +842,14 @@ static QEMUMachine pc_machine_v0_14 = {
.driver = "virtio-9p-pci",\
.property = "vectors",\
.value = stringify(0),\
+ },{\
+ .driver = "VGA",\
+ .property = "rombar",\
+ .value = stringify(0),\
+ },{\
+ .driver = "vmware-svga",\
+ .property = "rombar",\
+ .value = stringify(0),\
},
#define PC_I440FX_0_13_MACHINE_OPTIONS \
@@ -853,15 +861,6 @@ static QEMUMachine pc_machine_v0_13 = {
.name = "pc-0.13",
.compat_props = (GlobalProperty[]) {
PC_COMPAT_0_13
- {
- .driver = "VGA",
- .property = "rombar",
- .value = stringify(0),
- },{
- .driver = "vmware-svga",
- .property = "rombar",
- .value = stringify(0),
- },
{ /* end of list */ }
},
.hw_version = "0.13",
@@ -896,15 +895,6 @@ static QEMUMachine pc_machine_v0_12 = {
.name = "pc-0.12",
.compat_props = (GlobalProperty[]) {
PC_COMPAT_0_12
- {
- .driver = "VGA",
- .property = "rombar",
- .value = stringify(0),
- },{
- .driver = "vmware-svga",
- .property = "rombar",
- .value = stringify(0),
- },
{ /* end of list */ }
},
.hw_version = "0.12",
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH v2 13/13] piix: Define PC_COMPAT_0_10
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
` (11 preceding siblings ...)
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 12/13] piix: Move pc-0.1[23] rombar compat props " Eduardo Habkost
@ 2015-05-14 18:53 ` Eduardo Habkost
12 siblings, 0 replies; 18+ messages in thread
From: Eduardo Habkost @ 2015-05-14 18:53 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-ppc, pbonzini, rth
Move compat_props from pc-0.10 to the macro, to make it consistent with
the other machines.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 47 +++++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ac98af1..6734c62 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -930,32 +930,35 @@ static QEMUMachine pc_machine_v0_11 = {
.hw_version = "0.11",
};
+#define PC_COMPAT_0_10 \
+ PC_COMPAT_0_11 \
+ {\
+ .driver = "virtio-blk-pci",\
+ .property = "class",\
+ .value = stringify(PCI_CLASS_STORAGE_OTHER),\
+ },{\
+ .driver = "virtio-serial-pci",\
+ .property = "class",\
+ .value = stringify(PCI_CLASS_DISPLAY_OTHER),\
+ },{\
+ .driver = "virtio-net-pci",\
+ .property = "vectors",\
+ .value = stringify(0),\
+ },{\
+ .driver = "ide-drive",\
+ .property = "ver",\
+ .value = "0.10",\
+ },{\
+ .driver = "scsi-disk",\
+ .property = "ver",\
+ .value = "0.10",\
+ },
+
static QEMUMachine pc_machine_v0_10 = {
PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.10",
.compat_props = (GlobalProperty[]) {
- PC_COMPAT_0_11
- {
- .driver = "virtio-blk-pci",
- .property = "class",
- .value = stringify(PCI_CLASS_STORAGE_OTHER),
- },{
- .driver = "virtio-serial-pci",
- .property = "class",
- .value = stringify(PCI_CLASS_DISPLAY_OTHER),
- },{
- .driver = "virtio-net-pci",
- .property = "vectors",
- .value = stringify(0),
- },{
- .driver = "ide-drive",
- .property = "ver",
- .value = "0.10",
- },{
- .driver = "scsi-disk",
- .property = "ver",
- .value = "0.10",
- },
+ PC_COMPAT_0_10
{ /* end of list */ }
},
.hw_version = "0.10",
--
2.1.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [Qemu-devel] [PATCH v2 09/13] piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 09/13] piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14 Eduardo Habkost
@ 2015-05-18 7:35 ` Gerd Hoffmann
0 siblings, 0 replies; 18+ messages in thread
From: Gerd Hoffmann @ 2015-05-18 7:35 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-devel,
qemu-ppc, pbonzini, rth
On Do, 2015-05-14 at 15:53 -0300, Eduardo Habkost wrote:
> So, move the properties to PC_COMPAT_0_14. This makes pc-0.13 and
> older
> inherit them, but that shouldn't be an issue as QEMU 0.13 didn't
> support
> qxl.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Qemu-devel] [PATCH v2 10/13] piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 10/13] piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11 Eduardo Habkost
@ 2015-05-18 7:35 ` Gerd Hoffmann
0 siblings, 0 replies; 18+ messages in thread
From: Gerd Hoffmann @ 2015-05-18 7:35 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-devel,
qemu-ppc, pbonzini, rth
On Do, 2015-05-14 at 15:53 -0300, Eduardo Habkost wrote:
> The current code setting ide-drive.ver and scsi-disk.ver on pc-0.11
> breaks the PC_COMPAT_* nesting pattern we currently use.
>
> As those variables are overwritten in pc-0.10 too, they can be inherited
> by pc-0.10 with no side-effects at all.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Qemu-devel] [PATCH v2 11/13] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 11/13] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13 Eduardo Habkost
@ 2015-05-18 7:36 ` Gerd Hoffmann
0 siblings, 0 replies; 18+ messages in thread
From: Gerd Hoffmann @ 2015-05-18 7:36 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Michael S. Tsirkin, jasowang, Alexander Graf, qemu-devel,
qemu-ppc, Aneesh Kumar K.V, pbonzini, rth
On Do, 2015-05-14 at 15:53 -0300, Eduardo Habkost wrote:
> The compat property was added by commit
> 9dbcca5aa13cb9ab40788ac4c56bc227d94ca920, and the pc-0.12 and older
> machine-types were not changed because virtio-9p-pci was introduced on
> QEMU
> 0.13 (commit 9f10751365b26b13b8a9b67e0e90536ae3d282df). The only
> problem is
> that this breaks the PC_COMPAT_* nesting pattern we currently use.
>
> So, move the property to PC_COMPAT_0_13. This make pc-0.12 and older
> inherit
> it, but that shouldn't be an issue as QEMU 0.12 didn't have
> virtio-9p-pci.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Qemu-devel] [PATCH v2 12/13] piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 12/13] piix: Move pc-0.1[23] rombar compat props " Eduardo Habkost
@ 2015-05-18 7:37 ` Gerd Hoffmann
0 siblings, 0 replies; 18+ messages in thread
From: Gerd Hoffmann @ 2015-05-18 7:37 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Michael S. Tsirkin, Stefan Weil, jasowang, Alexander Graf,
qemu-devel, qemu-ppc, pbonzini, rth
On Do, 2015-05-14 at 15:53 -0300, Eduardo Habkost wrote:
> The VGA and vmware-svga rombar compat properties were added by commit
> 281a26b15b4adcecb8604216738975abd754bea8, but only to pc-0.13 and
> pc-0.12. This breaks the PC_COMPAT_* nesting pattern we currently
> follow.
>
> The new variables will now be inherited by pc-0.11 and older, but
> pc-0.11 and pc-0.10 already have PCI.rombar=0 on compat_props, so they
> shouldn't be affected at all.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2015-05-18 7:37 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 18:52 [Qemu-devel] [PATCH v2 00/13] pc, hw, spapr: Cleanup of {HW, PC, SPAPR}_COMPAT_* macros Eduardo Habkost
2015-05-14 18:52 ` [Qemu-devel] [PATCH v2 01/13] pc: Replace tab with spaces Eduardo Habkost
2015-05-14 18:52 ` [Qemu-devel] [PATCH v2 02/13] hw: Move commas inside HW_COMPAT_2_1 macro Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 03/13] pc: Move commas inside PC_COMPAT_* macros Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 04/13] spapr: Move commas inside SPAPR_COMPAT_* macros Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 05/13] hw: Define empty HW_COMPAT_2_[23] macros Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 06/13] pc: Define PC_COMPAT_2_[123] macros Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 07/13] spapr: Use HW_COMPAT_* inside SPAPR_COMPAT_* macros Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 08/13] spapr: define SPAPR_COMPAT_2_3 Eduardo Habkost
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 09/13] piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14 Eduardo Habkost
2015-05-18 7:35 ` Gerd Hoffmann
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 10/13] piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11 Eduardo Habkost
2015-05-18 7:35 ` Gerd Hoffmann
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 11/13] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13 Eduardo Habkost
2015-05-18 7:36 ` Gerd Hoffmann
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 12/13] piix: Move pc-0.1[23] rombar compat props " Eduardo Habkost
2015-05-18 7:37 ` Gerd Hoffmann
2015-05-14 18:53 ` [Qemu-devel] [PATCH v2 13/13] piix: Define PC_COMPAT_0_10 Eduardo Habkost
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.