From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL v2 13/36] accel/hvf: Report missing com.apple.security.hypervisor entitlement
Date: Fri, 4 Jul 2025 15:24:36 +0200 [thread overview]
Message-ID: <20250704132439.25743-4-philmd@linaro.org> (raw)
In-Reply-To: <20250704132439.25743-1-philmd@linaro.org>
We need the QEMU binary signed to be able to use HVF.
Improve the following:
$ ./qemu-system-aarch64-unsigned -M virt -accel hvf
qemu-system-aarch64-unsigned: -accel hvf: Error: ret = HV_DENIED (0xfae94007, at ../../accel/hvf/hvf-accel-ops.c:339)
Abort trap: 6
to:
$ ./qemu-system-aarch64-unsigned -M virt -accel hvf
qemu-system-aarch64-unsigned: -accel hvf: Could not access HVF. Is the executable signed with com.apple.security.hypervisor entitlement?
Suggested-by: Shatyuka <shatyuka@qq.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2800
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Mads Ynddal <mads@ynddal.dk>
Message-Id: <20250702185332.43650-29-philmd@linaro.org>
---
accel/hvf/hvf-all.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
index ddc77e629f5..09fe3f24152 100644
--- a/accel/hvf/hvf-all.c
+++ b/accel/hvf/hvf-all.c
@@ -263,6 +263,11 @@ static int hvf_accel_init(MachineState *ms)
}
ret = hvf_arch_vm_create(ms, (uint32_t)pa_range);
+ if (ret == HV_DENIED) {
+ error_report("Could not access HVF. Is the executable signed"
+ " with com.apple.security.hypervisor entitlement?");
+ exit(1);
+ }
assert_hvf_ok(ret);
s = g_new0(HVFState, 1);
--
2.49.0
next prev parent reply other threads:[~2025-07-04 13:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 13:24 [PULL v2 00/36] Accelerators patches for 2025-07-04 Philippe Mathieu-Daudé
2025-07-04 13:24 ` [PULL v2 08/36] accel/tcg: Clear exit_request once in tcg_cpu_exec() Philippe Mathieu-Daudé
2025-07-04 13:24 ` [PULL v2 09/36] accel/tcg: Unregister the RCU before exiting RR thread Philippe Mathieu-Daudé
2025-07-10 14:33 ` Peter Maydell
2025-07-11 10:45 ` Philippe Mathieu-Daudé
2025-07-11 12:17 ` Peter Maydell
2025-07-04 13:24 ` Philippe Mathieu-Daudé [this message]
2025-07-04 13:24 ` [PULL v2 26/36] accel: Propagate AccelState to AccelClass::init_machine() Philippe Mathieu-Daudé
2025-07-04 13:24 ` [PULL v2 27/36] accel/hvf: Re-use QOM allocated state Philippe Mathieu-Daudé
2025-07-04 13:24 ` [PULL v2 34/36] accel/system: Convert pre_resume() from AccelOpsClass to AccelClass Philippe Mathieu-Daudé
2025-07-08 7:25 ` [PULL v2 00/36] Accelerators patches for 2025-07-04 Stefan Hajnoczi
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=20250704132439.25743-4-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).