mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hvf: Consistent types for vCPU handles
macOS Hypervisor.framework uses different types for identifying vCPUs, hv_vcpu_t or hv_vcpuid_t, depending on host architecture. They are not just differently named typedefs for the same primitive type, but reference different-width integers. Instead of using an integer type and casting where necessary, this change introduces a typedef which resolves the active architecture’s hvf typedef. It also removes a now-unnecessary cast. Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Reviewed-by: Roman Bolshakov <roman@roolebo.dev> Tested-by: Roman Bolshakov <roman@roolebo.dev> Message-ID: <20240605112556.43193-4-phil@philjordan.eu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
0e4e622e32
commit
f21f0cbc2c
2 changed files with 4 additions and 2 deletions
|
@ -13,8 +13,10 @@
|
|||
|
||||
#ifdef __aarch64__
|
||||
#include <Hypervisor/Hypervisor.h>
|
||||
typedef hv_vcpu_t hvf_vcpuid;
|
||||
#else
|
||||
#include <Hypervisor/hv.h>
|
||||
typedef hv_vcpuid_t hvf_vcpuid;
|
||||
#endif
|
||||
|
||||
/* hvf_slot flags */
|
||||
|
@ -50,7 +52,7 @@ struct HVFState {
|
|||
extern HVFState *hvf_state;
|
||||
|
||||
struct AccelCPUState {
|
||||
uint64_t fd;
|
||||
hvf_vcpuid fd;
|
||||
void *exit;
|
||||
bool vtimer_masked;
|
||||
sigset_t unblock_ipi_mask;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue