Message ID | 20230601142704.68768-1-quic_acaggian@quicinc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hvf: Report HV_DENIED error | expand |
On Thu, 1 Jun 2023 at 15:27, Antonio Caggiano <quic_acaggian@quicinc.com> wrote: > > 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> > --- > accel/hvf/hvf-all.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c > index 0043f4d308..679907a147 100644 > --- a/accel/hvf/hvf-all.c > +++ b/accel/hvf/hvf-all.c > @@ -38,6 +38,9 @@ void assert_hvf_ok(hv_return_t ret) > case HV_UNSUPPORTED: > error_report("Error: HV_UNSUPPORTED"); > break; > + case HV_DENIED: > + error_report("Error: HV_DENIED"); > + break; > default: > error_report("Unknown Error"); > } HV_DENIED only appeared in macos 11, so this will break the build on Catalina (10.15). Catalina isn't in our official list of supported versions any more (too old) so we don't strictly have to support it, but is it easy to add some kind of ifdef so we don't break it just yet ? thanks -- PMM
diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 0043f4d308..679907a147 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -38,6 +38,9 @@ void assert_hvf_ok(hv_return_t ret) case HV_UNSUPPORTED: error_report("Error: HV_UNSUPPORTED"); break; + case HV_DENIED: + error_report("Error: HV_DENIED"); + break; default: error_report("Unknown Error"); }
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> --- accel/hvf/hvf-all.c | 3 +++ 1 file changed, 3 insertions(+)