Skip to contentSkip to conversation

target/i386: allow RDMSR of MSR_TSC_AUX outside TARGET_X86_64

PATCH New Keke Ming 1 participant 1 message Aug 8

lore
Share & tools
lore

Keke Ming

author
#0 lore raw

PATCH 1/1 target/i386: allow RDMSR of MSR_TSC_AUX outside TARGET_X86_64

WRMSR already accepts MSR_TSC_AUX outside TARGET_X86_64 and stores the value in env->tsc_aux. RDMSR only returns env->tsc_aux inside the TARGET_X86_64 block, which makes the TCG i386 target unable to read back a value it can write.

---
 target/i386/tcg/system/misc_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/tcg/system/misc_helper.c +1 -1
index 2998b1aae7..eb06f032af 100644
@@ -387,10 +387,10 @@ void helper_rdmsr(CPUX86State *env)
     case MSR_KERNELGSBASE:
         val = env->kernelgsbase;
         break;
+#endif
     case MSR_TSC_AUX:
         val = env->tsc_aux;
         break;
-#endif
     case MSR_SMI_COUNT:
         val = env->msr_smi_count;
         break;
Signature · 1 line
2.43.0