On 28/11/25 9:02 pm, Philippe Mathieu-Daudé wrote:
On 28/11/25 09:46, Nguyen Dinh Phi [SG] wrote:
On 26/11/25 9:39 pm, Philippe Mathieu-Daudé wrote:
On 26/11/25 10:46, [email protected] wrote:
From: Nguyen Dinh Phi <[email protected]>
Recent changes introduced build errors in the i386 HVF backend:
- ../accel/hvf/hvf-accel-ops.c:163:17: error: no member named
'guest_debug_enabled' in 'struct AccelCPUState'
163 | cpu->accel->guest_debug_enabled = false;
- ../accel/hvf/hvf-accel-ops.c:151:51
error: no member named 'unblock_ipi_mask' in 'struct AccelCPUState'
- ../target/i386/hvf/hvf.c:736:5
error: use of undeclared identifier 'rip'
- ../target/i386/hvf/hvf.c:737:5
error: use of undeclared identifier 'env'
This patch corrects the field usage and move identifier to correct
function ensuring successful compilation of the i386 HVF backend.
These issues were caused by:
Fixes: 2ad756383e1b (“accel/hvf: Restrict ARM-specific fields of
AccelCPUState”)
Fixes: 2a21c9244740 (“target/i386/hvf: Factor hvf_handle_vmexit() out”)
Oops.
Signed-off-by: Nguyen Dinh Phi <[email protected]>
---
accel/hvf/hvf-accel-ops.c | 5 +++--
target/i386/hvf/hvf.c | 6 ++----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
index 3e5feecd8a..e2cb8f202b 100644
--- a/accel/hvf/hvf-accel-ops.c
+++ b/accel/hvf/hvf-accel-ops.c
@@ -148,19 +148,20 @@ static int hvf_init_vcpu(CPUState *cpu)
sigact.sa_handler = dummy_signal;
sigaction(SIG_IPI, &sigact, NULL);
+#ifdef __aarch64__
pthread_sigmask(SIG_BLOCK, NULL, &cpu->accel->unblock_ipi_mask);
sigdelset(&cpu->accel->unblock_ipi_mask, SIG_IPI);
-#ifdef __aarch64__
r = hv_vcpu_create(&cpu->accel->fd,
(hv_vcpu_exit_t **)&cpu->accel->exit, NULL);
#else
r = hv_vcpu_create(&cpu->accel->fd, HV_VCPU_DEFAULT);
#endif
assert_hvf_ok(r);
+#ifdef __aarch64__
cpu->vcpu_dirty = true;
Don't we want the ifdef *after* this line?
Oops, that was acutally that I meant to do, I think I made mistake
when formatting the code. I will send a new version to move the #ifdef
line. Somehow the vm still work normally on my intel Macbook.
Does that mean you tested this patch and it works for you? I posted v2:
https://lore.kernel.org/qemu-devel/20251126134434.14355-1-
[email protected]/
Aw, sorry, I didn't aware of this.
What do you plan to change with it?
Generally,it is them same as your post.
Yes, I tested my patch and it works fine, however, my original plan was to
make the change similar to what you posted. I tried your patch too, and it
works as expected, I think your patch does it better.
Thanks,
Phi