qemu/target/i386/hvf
Alexander Graf 358e7505b2 hvf: Move cpu functions into common directory
Until now, Hypervisor.framework has only been available on x86_64 systems.
With Apple Silicon shipping now, it extends its reach to aarch64. To
prepare for support for multiple architectures, let's start moving common
code out into its own accel directory.

This patch moves CPU and memory operations over. While at it, make sure
the code is consumable on non-i386 systems.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Message-id: 20210519202253.76782-4-agraf@csgraf.de
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-06-03 16:43:26 +01:00
..
hvf-cpu.c i386: split cpu accelerators from cpu.c, using AccelCPUClass 2021-05-10 15:41:49 -04:00
hvf-i386.h hvf: Move cpu functions into common directory 2021-06-03 16:43:26 +01:00
hvf.c hvf: Move cpu functions into common directory 2021-06-03 16:43:26 +01:00
meson.build hvf: Move vcpu thread functions into common directory 2021-06-03 16:43:26 +01:00
panic.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
README.md i386: Compile CPUX86State xsave_buf only when support KVM or HVF 2018-10-02 19:09:12 +02:00
vmcs.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
vmx.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_cpuid.c hvf: Guard xgetbv call 2021-02-16 17:15:39 +01:00
x86_decode.c x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_decode.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_descr.c x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_descr.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_emu.c target/i386/hvf: add rdmsr 35H MSR_CORE_THREAD_COUNT 2021-02-16 17:15:39 +01:00
x86_emu.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_flags.c x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_flags.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_mmu.c Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
x86_mmu.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_task.c accel: extend AccelState and AccelClass to user-mode 2021-02-05 10:24:15 -10:00
x86_task.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
x86.c x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86.h hvf: Fix segment selector format 2020-11-18 09:32:17 +01:00
x86hvf.c hvf: Move vcpu thread functions into common directory 2021-06-03 16:43:26 +01:00
x86hvf.h hvf: Move cpu functions into common directory 2021-06-03 16:43:26 +01:00

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