[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 7/9] target/i386: fix TCG UCODE_REV access
From: |
Paolo Bonzini |
Subject: |
[PULL 7/9] target/i386: fix TCG UCODE_REV access |
Date: |
Wed, 12 Feb 2020 17:41:27 +0100 |
This was a very interesting semantic conflict that caused git to move
the MSR_IA32_UCODE_REV read to helper_wrmsr. Not a big deal, but
still should be fixed...
Fixes: 4e45aff398 ("target/i386: add a ucode-rev property", 2020-01-24)
Message-id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/misc_helper.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/i386/misc_helper.c b/target/i386/misc_helper.c
index aed16fe3f0..7d61221024 100644
--- a/target/i386/misc_helper.c
+++ b/target/i386/misc_helper.c
@@ -229,7 +229,6 @@ void helper_rdmsr(CPUX86State *env)
#else
void helper_wrmsr(CPUX86State *env)
{
- X86CPU *x86_cpu = env_archcpu(env);
uint64_t val;
cpu_svm_check_intercept_param(env, SVM_EXIT_MSR, 1, GETPC());
@@ -372,9 +371,6 @@ void helper_wrmsr(CPUX86State *env)
env->msr_bndcfgs = val;
cpu_sync_bndcs_hflags(env);
break;
- case MSR_IA32_UCODE_REV:
- val = x86_cpu->ucode_rev;
- break;
default:
if ((uint32_t)env->regs[R_ECX] >= MSR_MC0_CTL
&& (uint32_t)env->regs[R_ECX] < MSR_MC0_CTL +
@@ -393,6 +389,7 @@ void helper_wrmsr(CPUX86State *env)
void helper_rdmsr(CPUX86State *env)
{
+ X86CPU *x86_cpu = env_archcpu(env);
uint64_t val;
cpu_svm_check_intercept_param(env, SVM_EXIT_MSR, 0, GETPC());
@@ -526,6 +523,9 @@ void helper_rdmsr(CPUX86State *env)
case MSR_IA32_BNDCFGS:
val = env->msr_bndcfgs;
break;
+ case MSR_IA32_UCODE_REV:
+ val = x86_cpu->ucode_rev;
+ break;
default:
if ((uint32_t)env->regs[R_ECX] >= MSR_MC0_CTL
&& (uint32_t)env->regs[R_ECX] < MSR_MC0_CTL +
--
2.21.0
- [PULL 0/9] Mini misc patches queue for 2020-02-12, Paolo Bonzini, 2020/02/12
- [PULL 1/9] vl: Don't mismatch g_strsplit()/g_free(), Paolo Bonzini, 2020/02/12
- [PULL 2/9] seqlock: fix seqlock_write_unlock_impl function, Paolo Bonzini, 2020/02/12
- [PULL 3/9] Remove support for CLOCK_MONOTONIC not being defined, Paolo Bonzini, 2020/02/12
- [PULL 4/9] minikconf: accept alnum identifiers, Paolo Bonzini, 2020/02/12
- [PULL 5/9] exec: do not define use_icount for user-mode emulation, Paolo Bonzini, 2020/02/12
- [PULL 6/9] build: move TARGET_GPROF to config-host.mak, Paolo Bonzini, 2020/02/12
- [PULL 7/9] target/i386: fix TCG UCODE_REV access,
Paolo Bonzini <=
- [PULL 8/9] target/i386: check for availability of MSR_IA32_UCODE_REV as an emulated MSR, Paolo Bonzini, 2020/02/12
- [PULL 9/9] target/i386: enable monitor and ucode revision with -cpu max, Paolo Bonzini, 2020/02/12
- Re: [PULL 0/9] Mini misc patches queue for 2020-02-12, Peter Maydell, 2020/02/13