qemu/target/i386/hvf
Phil Dennis-Jordan a59f5b2f83 i386/hvf: Updates API usage to use modern vCPU run function
macOS 10.15 introduced the more efficient hv_vcpu_run_until() function
to supersede hv_vcpu_run(). According to the documentation, there is no
longer any reason to use the latter on modern host OS versions, especially
after 11.0 added support for an indefinite deadline.

Observed behaviour of the newer function is that as documented, it exits
much less frequently - and most of the original function’s exits seem to
have been effectively pointless.

Another reason to use the new function is that it is a prerequisite for
using newer features such as in-kernel APIC support. (Not covered by
this patch.)

This change implements the upgrade by selecting one of three code paths
at compile time: two static code paths for the new and old functions
respectively, when building for targets where the new function is either
not available, or where the built executable won’t run on older
platforms lacking the new function anyway. The third code path selects
dynamically based on runtime detected availability of the weakly-linked
symbol.

Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Message-ID: <20240605112556.43193-7-phil@philjordan.eu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-08 10:33:38 +02:00
..
hvf-cpu.c
hvf-i386.h
hvf.c i386/hvf: Updates API usage to use modern vCPU run function 2024-06-08 10:33:38 +02:00
meson.build
panic.h
README.md
vmcs.h
vmx.h i386/hvf: Fixes some compilation warnings 2024-06-08 10:33:38 +02:00
x86_cpuid.c i386/hvf: Adds support for INVTSC cpuid bit 2024-06-08 10:33:38 +02:00
x86_decode.c i386/hvf: Fixes some compilation warnings 2024-06-08 10:33:38 +02:00
x86_decode.h
x86_descr.c target/i386/hvf: Use CPUState typedef 2024-03-12 12:03:58 +01:00
x86_descr.h target/i386/hvf: Use CPUState typedef 2024-03-12 12:03:58 +01:00
x86_emu.c i386/hvf: Fixes some compilation warnings 2024-06-08 10:33:38 +02:00
x86_emu.h target/i386/hvf: Use CPUState typedef 2024-03-12 12:03:58 +01:00
x86_flags.c
x86_flags.h
x86_mmu.c target/i386/hvf: Use CPUState typedef 2024-03-12 12:03:58 +01:00
x86_mmu.h target/i386/hvf: Use CPUState typedef 2024-03-12 12:03:58 +01:00
x86_task.c
x86_task.h
x86.c target/i386/hvf: Use CPUState typedef 2024-03-12 12:03:58 +01:00
x86.h target/i386/hvf: Use CPUState typedef 2024-03-12 12:03:58 +01:00
x86hvf.c accel/hvf: Use accel-specific per-vcpu @dirty field 2024-04-26 17:03:00 +02:00
x86hvf.h

OS X Hypervisor.framework support in QEMU

These sources (and ../hvf-all.c) are adapted from Veertu Inc's vdhh (Veertu Desktop Hosted Hypervisor) (last known location: https://github.com/veertuinc/vdhh) with some minor changes, the most significant of which were:

  1. Adapt to our current QEMU's CPUState structure and address_space_rw API; many struct members have been moved around (emulated x86 state, xsave_buf) due to historical differences + QEMU needing to handle more emulation targets.
  2. Removal of apic_page and hyperv-related functionality.
  3. More relaxed use of bql_lock.