[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/13] i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_
From: |
Paolo Bonzini |
Subject: |
[PULL 11/13] i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec |
Date: |
Fri, 8 Nov 2024 18:38:26 +0100 |
From: Phil Dennis-Jordan <phil@philjordan.eu>
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: 20241105155800.5461-6-phil@philjordan.eu">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>
---
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.47.0
- [PULL 04/13] target/i386: Fix legacy page table walk, (continued)
- [PULL 04/13] target/i386: Fix legacy page table walk, Paolo Bonzini, 2024/11/08
- [PULL 05/13] eif: cope with huge section offsets, Paolo Bonzini, 2024/11/08
- [PULL 07/13] i386/hvf: Integrates x2APIC support with hvf accel, Paolo Bonzini, 2024/11/08
- [PULL 06/13] eif: cope with huge section sizes, Paolo Bonzini, 2024/11/08
- [PULL 09/13] i386/hvf: Fixes startup memory leak (vmcs caps), Paolo Bonzini, 2024/11/08
- [PULL 08/13] i386/hvf: Fix for UB in handling CPUID function 0xD, Paolo Bonzini, 2024/11/08
- [PULL 10/13] i386/hvf: Raise exception on error setting APICBASE, Paolo Bonzini, 2024/11/08
- [PULL 12/13] rust: qemu-api-macros: always process subprojects before dependencies, Paolo Bonzini, 2024/11/08
- [PULL 11/13] i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec,
Paolo Bonzini <=
- [PULL 13/13] hw/i386/pc: Don't try to init PCI NICs if there is no PCI bus, Paolo Bonzini, 2024/11/08