aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorAntonio Caggiano <quic_acaggian@quicinc.com>2023-06-08 14:30:14 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-06-13 11:28:58 +0200
commited3958910aef1461d99123c78afb1d70b74a83d0 (patch)
tree1ff23d15073ee2911d5f885f3902db8bf05ed3b8 /accel
parentbb6af0fa51cac875e5986aada0de339dcc94eca5 (diff)
accel/hvf: Report HV_DENIED error
On MacOS 11 and subsequent versions, in case the resulting binary is not signed with the proper entitlement, handle and report the HV_DENIED error. Signed-off-by: Antonio Caggiano <quic_acaggian@quicinc.com> Message-Id: <20230608123014.28715-1-quic_acaggian@quicinc.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r--accel/hvf/hvf-all.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
index 754707dbfb..4920787af6 100644
--- a/accel/hvf/hvf-all.c
+++ b/accel/hvf/hvf-all.c
@@ -38,6 +38,12 @@ void assert_hvf_ok(hv_return_t ret)
case HV_UNSUPPORTED:
error_report("Error: HV_UNSUPPORTED");
break;
+#if defined(MAC_OS_VERSION_11_0) && \
+ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0
+ case HV_DENIED:
+ error_report("Error: HV_DENIED");
+ break;
+#endif
default:
error_report("Unknown Error");
}