aboutsummaryrefslogtreecommitdiff
path: root/target/i386/hvf
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-01-20 19:21:43 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-24 20:59:09 +0100
commit4e45aff398cd1542c2a384a2a3b8600f23337d86 (patch)
tree1f17078d6deb971b2bfea955985a1cc39d1a2bc9 /target/i386/hvf
parent420ae1fc51c99abfd03b1c590f55617edd2a2bed (diff)
target/i386: add a ucode-rev property
Add the property and plumb it in TCG and HVF (the latter of which tried to support returning a constant value but used the wrong MSR). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1579544504-3616-3-git-send-email-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/hvf')
-rw-r--r--target/i386/hvf/x86_emu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86_emu.c
index 3df767209d..92ab815f5d 100644
--- a/target/i386/hvf/x86_emu.c
+++ b/target/i386/hvf/x86_emu.c
@@ -664,8 +664,6 @@ static void exec_lods(struct CPUX86State *env, struct x86_decode *decode)
RIP(env) += decode->len;
}
-#define MSR_IA32_UCODE_REV 0x00000017
-
void simulate_rdmsr(struct CPUState *cpu)
{
X86CPU *x86_cpu = X86_CPU(cpu);
@@ -681,7 +679,7 @@ void simulate_rdmsr(struct CPUState *cpu)
val = cpu_get_apic_base(X86_CPU(cpu)->apic_state);
break;
case MSR_IA32_UCODE_REV:
- val = (0x100000000ULL << 32) | 0x100000000ULL;
+ val = x86_cpu->ucode_rev;
break;
case MSR_EFER:
val = rvmcs(cpu->hvf_fd, VMCS_GUEST_IA32_EFER);