aboutsummaryrefslogtreecommitdiff
path: root/target/i386/machine.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-11-21 17:18:40 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-11-21 17:18:40 +0000
commit2061735ff09f9d5e67c501a96227b470e7de69b1 (patch)
tree96422f38427bbc6f6f3badc78e03d0d5065eb396 /target/i386/machine.c
parent996970236c00f244ed9518238fef480725a40ff2 (diff)
parent02fa60d10137ed2ef17534718d7467e0d2170142 (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* x86 updates for Intel errata (myself, Eduardo) * the big ugly list of x86 VMX features, which was targeted for 5.0 but caused a Libvirt regression (myself) # gpg: Signature made Thu 21 Nov 2019 15:35:13 GMT # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: i386: Add -noTSX aliases for hle=off, rtm=off CPU models i386: Add new versions of Skylake/Cascadelake/Icelake without TSX target/i386: add support for MSR_IA32_TSX_CTRL target/i386: add VMX features to named CPU models Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/i386/machine.c')
-rw-r--r--target/i386/machine.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 7bdeb78157..2699eed94e 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -1293,6 +1293,25 @@ static const VMStateDescription vmstate_efer32 = {
};
#endif
+static bool msr_tsx_ctrl_needed(void *opaque)
+{
+ X86CPU *cpu = opaque;
+ CPUX86State *env = &cpu->env;
+
+ return env->features[FEAT_ARCH_CAPABILITIES] & ARCH_CAP_TSX_CTRL_MSR;
+}
+
+static const VMStateDescription vmstate_msr_tsx_ctrl = {
+ .name = "cpu/msr_tsx_ctrl",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = msr_tsx_ctrl_needed,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT32(env.tsx_ctrl, X86CPU),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
VMStateDescription vmstate_x86_cpu = {
.name = "cpu",
.version_id = 12,
@@ -1427,6 +1446,7 @@ VMStateDescription vmstate_x86_cpu = {
#ifdef CONFIG_KVM
&vmstate_nested_state,
#endif
+ &vmstate_msr_tsx_ctrl,
NULL
}
};