HV_DENIED was added to Hypervisor.framework's hv_return_t in the macOS 11 SDK; the 10.15 SDK stops at HV_UNSUPPORTED. qemu 11.1.0 uses it in a diagnostic string table and in a comparison against hvf_arch_vm_create(). The value (err_common_hypervisor | 0x07) is taken verbatim from the 11.1 SDK's Hypervisor/hv_error.h, so the runtime comparison stays correct rather than merely compiling. --- accel/hvf/hvf-all.c.orig +++ accel/hvf/hvf-all.c @@ -9,6 +9,15 @@ */ #include "qemu/osdep.h" + +/* HV_DENIED was added to Hypervisor.framework's hv_return_t in the macOS 11 + * SDK; the 10.15 SDK stops at HV_UNSUPPORTED. Value taken verbatim from the + * 11.1 SDK's hv_error.h so the runtime comparison stays correct. */ +#if !defined(MAC_OS_VERSION_11_0) || \ + MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_11_0 +#include +#define HV_DENIED (err_common_hypervisor | 0x07) +#endif #include "qemu/error-report.h" #include "qapi/error.h" #include "qapi/qapi-visit-common.h"