summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEduardo Habkost2014-06-25 04:04:44 +0200
committerMichael S. Tsirkin2014-06-29 17:59:06 +0200
commitb8f5cfd6824ee7122e714ffc7e893432dd7beae5 (patch)
tree2ac9fc062124482dc5ccc54f194eef4808baded2 /include
parentnuma: fix comment (diff)
downloadqemu-b8f5cfd6824ee7122e714ffc7e893432dd7beae5.tar.gz
qemu-b8f5cfd6824ee7122e714ffc7e893432dd7beae5.tar.xz
qemu-b8f5cfd6824ee7122e714ffc7e893432dd7beae5.zip
pc: Move q35 compat props to PC_COMPAT_*
For each compat property on PC_Q35_COMPAT_*, there are only two possibilities: * If the device is never instantiated when using a machine other than pc-q35, then the compat property can be safely added to PC_COMPAT_*; * If the device can be instantiated when using a machine other than pc-q35, that means the other machines also need the compat property to be set. That means we don't need separate PC_Q35_COMPAT_* macros at all, today. The hpet.hpet-intcap case is interesting: piix and q35 do have something that emulates different defaults, but the machine-specific default is applied _after_ compat_props are applied, by simply checking if the property is zero (which is the real default on the hpet code). The hpet.hpet-intcap=0x4 compat property can (should?) be applied to piix too, because 0x4 was the default on both piix and q35 before the hpet-intcap property was introduced. Now, if one day we change the default HPET intcap on one of the PC machine-types again, we may want to introduce PC_{Q35,I440FX}_COMPAT macros. But while we don't need that, we can keep the code simple. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Cc: Liu Ping Fan <pingfank@linux.vnet.ibm.com> Cc: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/i386/pc.h55
1 files changed, 18 insertions, 37 deletions
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 486e98feac..81718b8430 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -294,43 +294,6 @@ 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_Q35_COMPAT_2_0 \
- PC_COMPAT_2_0, \
- {\
- .driver = "ICH9-LPC",\
- .property = "memory-hotplug-support",\
- .value = "off",\
- },{\
- .driver = "xio3130-downstream",\
- .property = COMPAT_PROP_PCP,\
- .value = "off",\
- },{\
- .driver = "ioh3420",\
- .property = COMPAT_PROP_PCP,\
- .value = "off",\
- }
-
-#define PC_Q35_COMPAT_1_7 \
- PC_COMPAT_1_7, \
- PC_Q35_COMPAT_2_0, \
- {\
- .driver = "hpet",\
- .property = HPET_INTCAP,\
- .value = stringify(4),\
- }
-
-#define PC_Q35_COMPAT_1_6 \
- PC_COMPAT_1_6, \
- PC_Q35_COMPAT_1_7
-
-#define PC_Q35_COMPAT_1_5 \
- PC_COMPAT_1_5, \
- PC_Q35_COMPAT_1_6
-
-#define PC_Q35_COMPAT_1_4 \
- PC_COMPAT_1_4, \
- PC_Q35_COMPAT_1_5
-
#define PC_COMPAT_2_0 \
{\
.driver = "virtio-scsi-pci",\
@@ -370,6 +333,19 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "virtio-net-pci",\
.property = "guest_announce",\
.value = "off",\
+ },\
+ {\
+ .driver = "ICH9-LPC",\
+ .property = "memory-hotplug-support",\
+ .value = "off",\
+ },{\
+ .driver = "xio3130-downstream",\
+ .property = COMPAT_PROP_PCP,\
+ .value = "off",\
+ },{\
+ .driver = "ioh3420",\
+ .property = COMPAT_PROP_PCP,\
+ .value = "off",\
}
#define PC_COMPAT_1_7 \
@@ -383,6 +359,11 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "PIIX4_PM",\
.property = "acpi-pci-hotplug-with-bridge-support",\
.value = "off",\
+ },\
+ {\
+ .driver = "hpet",\
+ .property = HPET_INTCAP,\
+ .value = stringify(4),\
}
#define PC_COMPAT_1_6 \