qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] hvf: Report HV_DENIED error
@ 2023-06-08 12:30 Antonio Caggiano
  2023-06-13  9:33 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Antonio Caggiano @ 2023-06-08 12:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Cameron Esfahani, Roman Bolshakov

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>
---
v2: Use architecture specific defines from AvailabilityMacros.h to enable the
    HV_DENIED case only on MacOS 11 and subsequent versions.
v3: Fix ifdef guard.

 accel/hvf/hvf-all.c | 6 ++++++
 1 file changed, 6 insertions(+)

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");
     }
-- 
2.40.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] hvf: Report HV_DENIED error
  2023-06-08 12:30 [PATCH v3] hvf: Report HV_DENIED error Antonio Caggiano
@ 2023-06-13  9:33 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-13  9:33 UTC (permalink / raw)
  To: Antonio Caggiano, qemu-devel
  Cc: Peter Maydell, Cameron Esfahani, Roman Bolshakov

On 8/6/23 14:30, Antonio Caggiano wrote:
> 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>
> ---
> v2: Use architecture specific defines from AvailabilityMacros.h to enable the
>      HV_DENIED case only on MacOS 11 and subsequent versions.
> v3: Fix ifdef guard.
> 
>   accel/hvf/hvf-all.c | 6 ++++++
>   1 file changed, 6 insertions(+)

Queued, thanks!



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-13  9:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08 12:30 [PATCH v3] hvf: Report HV_DENIED error Antonio Caggiano
2023-06-13  9:33 ` Philippe Mathieu-Daudé

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).