[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/5] i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_e
From: |
Phil Dennis-Jordan |
Subject: |
[PATCH 5/5] i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec |
Date: |
Tue, 5 Nov 2024 16:58:00 +0100 |
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>
---
target/i386/hvf/hvf.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 8527bce6eef..c5d025d5576 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 {
--
2.39.3 (Apple Git-145)
- [PATCH 0/5] i386/hvf: x2apic support and some small fixes, Phil Dennis-Jordan, 2024/11/05
- [PATCH 1/5] i386/hvf: Integrates x2APIC support with hvf accel, Phil Dennis-Jordan, 2024/11/05
- [PATCH 2/5] i386/hvf: Fix for UB in handling CPUID function 0xD, Phil Dennis-Jordan, 2024/11/05
- [PATCH 3/5] i386/hvf: Fixes startup memory leak (vmcs caps), Phil Dennis-Jordan, 2024/11/05
- [PATCH 4/5] i386/hvf: Raise exception on error setting APICBASE, Phil Dennis-Jordan, 2024/11/05
- [PATCH 5/5] i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec,
Phil Dennis-Jordan <=
- Re: [PATCH 0/5] i386/hvf: x2apic support and some small fixes, Roman Bolshakov, 2024/11/06