From 7ed89963702e6c53c20864b564a5b43712a38ccd Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Thu, 25 Jun 2015 19:31:24 +0200 Subject: [PATCH 04/10] kvm: always update the MPX model specific register Message-id: <1435260689-9556-4-git-send-email-ehabkost@redhat.com> Patchwork-id: 66501 O-Subject: [RHEL-7.2 qemu-kvm PATCH 3/8] kvm: always update the MPX model specific register Bugzilla: 1233350 RH-Acked-by: Igor Mammedov RH-Acked-by: Bandan Das RH-Acked-by: Paolo Bonzini From: Paolo Bonzini The original patch from Liu Jinsong restricted them to reset or full state updates, but that's unnecessary (and wrong) since the BNDCFGS MSR has no side effects. Cc: Liu Jinsong Signed-off-by: Paolo Bonzini (cherry picked from commit 439d19f2922ac409ee224bc1e5522cee7009d829) Signed-off-by: Eduardo Habkost Signed-off-by: Miroslav Rezanina Conflicts: target-i386/kvm.c --- target-i386/kvm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 6d9aa63..bbbbac0 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1155,6 +1155,9 @@ static int kvm_put_msrs(X86CPU *cpu, int level) kvm_msr_entry_set(&msrs[n++], MSR_IA32_MISC_ENABLE, env->msr_ia32_misc_enable); } + if (has_msr_bndcfgs) { + kvm_msr_entry_set(&msrs[n++], MSR_IA32_BNDCFGS, env->msr_bndcfgs); + } #ifdef TARGET_X86_64 if (lm_capable_kernel) { kvm_msr_entry_set(&msrs[n++], MSR_CSTAR, env->cstar); @@ -1266,9 +1269,6 @@ static int kvm_put_msrs(X86CPU *cpu, int level) MSR_MTRRphysMask(i), env->mtrr_var[i].mask); } } - if (has_msr_bndcfgs) { - kvm_msr_entry_set(&msrs[n++], MSR_IA32_BNDCFGS, env->msr_bndcfgs); - } } if (env->mcg_cap) { int i; -- 1.8.3.1