aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Dennis-Jordan <phil@philjordan.eu>2024-11-05 16:58:00 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-11-09 08:34:07 +0100
commitb659ef9d358a692f941f1f46e7abef29231960d1 (patch)
tree0b06fd3e9c01713d072fd3d123d65f7e93ddaecc
parent04858f95fa4b318bb662e046ab090179a1eeeebb (diff)
i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec
Pointers to the x86 CPU state already exist at the function scope, no need to re-obtain them in individual exit reason cases. Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Link: https://lore.kernel.org/r/20241105155800.5461-6-phil@philjordan.eu Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--target/i386/hvf/hvf.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 8527bce6ee..c5d025d557 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -586,8 +586,6 @@ int hvf_vcpu_exec(CPUState *cpu)
break;
}
case EXIT_REASON_XSETBV: {
- X86CPU *x86_cpu = X86_CPU(cpu);
- CPUX86State *env = &x86_cpu->env;
uint32_t eax = (uint32_t)rreg(cpu->accel->fd, HV_X86_RAX);
uint32_t ecx = (uint32_t)rreg(cpu->accel->fd, HV_X86_RCX);
uint32_t edx = (uint32_t)rreg(cpu->accel->fd, HV_X86_RDX);
@@ -644,7 +642,6 @@ int hvf_vcpu_exec(CPUState *cpu)
break;
}
case 8: {
- X86CPU *x86_cpu = X86_CPU(cpu);
if (exit_qual & 0x10) {
RRX(env, reg) = cpu_get_apic_tpr(x86_cpu->apic_state);
} else {