From: Phil Dennis-Jordan <phil@philjordan.eu>
To: qemu-devel@nongnu.org
Cc: dirty@apple.com, rbolshakov@ddn.com,
Phil Dennis-Jordan <phil@philjordan.eu>
Subject: [PATCH 4/4] i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec
Date: Thu, 24 Oct 2024 21:43:03 +0200 [thread overview]
Message-ID: <20241024194303.32100-5-phil@philjordan.eu> (raw)
In-Reply-To: <20241024194303.32100-1-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>
---
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)
prev parent reply other threads:[~2024-10-24 19:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 19:42 [PATCH 0/4] i386/hvf: x2apic support and some small fixes Phil Dennis-Jordan
2024-10-24 19:43 ` [PATCH 1/4] i386/hvf: Integrates x2APIC support with hvf accel Phil Dennis-Jordan
2024-10-24 19:43 ` [PATCH 2/4] i386/hvf: Fixes startup memory leak (vmcs caps) Phil Dennis-Jordan
2024-10-24 19:43 ` [PATCH 3/4] i386/hvf: Raise exception on error setting APICBASE Phil Dennis-Jordan
2024-10-24 19:43 ` Phil Dennis-Jordan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241024194303.32100-5-phil@philjordan.eu \
--to=phil@philjordan.eu \
--cc=dirty@apple.com \
--cc=qemu-devel@nongnu.org \
--cc=rbolshakov@ddn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).