aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-05-24 13:06:32 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-05-24 13:06:33 +0100
commit287db79df8af8e31f18e262feb5e05103a09e4d4 (patch)
tree6dfb7a7530923d0c1b1995043c4227f1b2f8831a /include
parent99694362ee563c5bbfad92bcc6bd578c0d4f7ce7 (diff)
parent1abc2cae46b77ed345fd3eff88a49fe8f4b24abe (diff)
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging
X86 queue, 2016-05-23 # gpg: Signature made Mon 23 May 2016 23:48:27 BST using RSA key ID 984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" * remotes/ehabkost/tags/x86-pull-request: target-i386: kvm: Eliminate kvm_msr_entry_set() target-i386: kvm: Simplify MSR setting functions target-i386: kvm: Simplify MSR array construction target-i386: kvm: Increase MSR_BUF_SIZE target-i386: kvm: Allocate kvm_msrs struct once per VCPU target-i386: Call cpu_exec_init() on realize target-i386: Move TCG initialization to realize time target-i386: Move TCG initialization check to tcg_x86_init() cpu: Eliminate cpudef_init(), cpudef_setup() target-i386: Set constant model_id for qemu64/qemu32/athlon pc: Set CPU model-id on compat_props for pc <= 2.4 osdep: Move default qemu_hw_version() value to a macro target-i386: kvm: Use X86XSaveArea struct for xsave save/load target-i386: Use xsave structs for ext_save_area target-i386: Define structs for layout of xsave area Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/i386/pc.h29
-rw-r--r--include/qemu/osdep.h9
-rw-r--r--include/sysemu/arch_init.h1
3 files changed, 38 insertions, 1 deletions
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 367b6dbf0e..9ca23098bd 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -359,8 +359,29 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
#define PC_COMPAT_2_5 \
HW_COMPAT_2_5
+/* Helper for setting model-id for CPU models that changed model-id
+ * depending on QEMU versions up to QEMU 2.4.
+ */
+#define PC_CPU_MODEL_IDS(v) \
+ {\
+ .driver = "qemu32-" TYPE_X86_CPU,\
+ .property = "model-id",\
+ .value = "QEMU Virtual CPU version " v,\
+ },\
+ {\
+ .driver = "qemu64-" TYPE_X86_CPU,\
+ .property = "model-id",\
+ .value = "QEMU Virtual CPU version " v,\
+ },\
+ {\
+ .driver = "athlon-" TYPE_X86_CPU,\
+ .property = "model-id",\
+ .value = "QEMU Virtual CPU version " v,\
+ },
+
#define PC_COMPAT_2_4 \
HW_COMPAT_2_4 \
+ PC_CPU_MODEL_IDS("2.4.0") \
{\
.driver = "Haswell-" TYPE_X86_CPU,\
.property = "abm",\
@@ -431,6 +452,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
#define PC_COMPAT_2_3 \
HW_COMPAT_2_3 \
+ PC_CPU_MODEL_IDS("2.3.0") \
{\
.driver = TYPE_X86_CPU,\
.property = "arat",\
@@ -511,6 +533,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
#define PC_COMPAT_2_2 \
HW_COMPAT_2_2 \
+ PC_CPU_MODEL_IDS("2.3.0") \
{\
.driver = "kvm64" "-" TYPE_X86_CPU,\
.property = "vme",\
@@ -604,6 +627,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
#define PC_COMPAT_2_1 \
HW_COMPAT_2_1 \
+ PC_CPU_MODEL_IDS("2.1.0") \
{\
.driver = "coreduo" "-" TYPE_X86_CPU,\
.property = "vmx",\
@@ -616,6 +640,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_2_0 \
+ PC_CPU_MODEL_IDS("2.0.0") \
{\
.driver = "virtio-scsi-pci",\
.property = "any_layout",\
@@ -675,6 +700,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_1_7 \
+ PC_CPU_MODEL_IDS("1.7.0") \
{\
.driver = TYPE_USB_DEVICE,\
.property = "msos-desc",\
@@ -692,6 +718,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_1_6 \
+ PC_CPU_MODEL_IDS("1.6.0") \
{\
.driver = "e1000",\
.property = "mitigation",\
@@ -715,6 +742,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_1_5 \
+ PC_CPU_MODEL_IDS("1.5.0") \
{\
.driver = "Conroe-" TYPE_X86_CPU,\
.property = "model",\
@@ -758,6 +786,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_1_4 \
+ PC_CPU_MODEL_IDS("1.4.0") \
{\
.driver = "scsi-hd",\
.property = "discard_granularity",\
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 994bfa023a..693769403f 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -327,6 +327,15 @@ static inline void qemu_timersub(const struct timeval *val1,
void qemu_set_cloexec(int fd);
+/* Starting on QEMU 2.5, qemu_hw_version() returns "2.5+" by default
+ * instead of QEMU_VERSION, so setting hw_version on MachineClass
+ * is no longer mandatory.
+ *
+ * Do NOT change this string, or it will break compatibility on all
+ * machine classes that don't set hw_version.
+ */
+#define QEMU_HW_VERSION "2.5+"
+
/* QEMU "hardware version" setting. Used to replace code that exposed
* QEMU_VERSION to guests in the past and need to keep compatibility.
* Do not use qemu_hw_version() in new code.
diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index c38892fec6..d690dfabdf 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -30,7 +30,6 @@ extern const uint32_t arch_type;
void select_soundhw(const char *optarg);
void do_acpitable_option(const QemuOpts *opts);
void do_smbios_option(QemuOpts *opts);
-void cpudef_init(void);
void audio_init(void);
int kvm_available(void);
int xen_available(void);