aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Graf <agraf@csgraf.de>2021-06-03 14:09:31 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-06-03 16:43:26 +0100
commit861457ce73bc9e0e56d866b5c06e2c745fe53448 (patch)
treeaebb691313b7fdd95b2be872022b2ad9550014ec /include
parent358e7505b2795d3df505661da7be9dc81eaa91d9 (diff)
downloadqemu-861457ce73bc9e0e56d866b5c06e2c745fe53448.zip
qemu-861457ce73bc9e0e56d866b5c06e2c745fe53448.tar.gz
qemu-861457ce73bc9e0e56d866b5c06e2c745fe53448.tar.bz2
hvf: Move hvf internal definitions into common header
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 a few internal struct and constant defines over. Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-5-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/hvf_int.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/sysemu/hvf_int.h b/include/sysemu/hvf_int.h
index 4c657b0..ef84a24 100644
--- a/include/sysemu/hvf_int.h
+++ b/include/sysemu/hvf_int.h
@@ -13,6 +13,36 @@
#include <Hypervisor/hv.h>
+/* hvf_slot flags */
+#define HVF_SLOT_LOG (1 << 0)
+
+typedef struct hvf_slot {
+ uint64_t start;
+ uint64_t size;
+ uint8_t *mem;
+ int slot_id;
+ uint32_t flags;
+ MemoryRegion *region;
+} hvf_slot;
+
+typedef struct hvf_vcpu_caps {
+ uint64_t vmx_cap_pinbased;
+ uint64_t vmx_cap_procbased;
+ uint64_t vmx_cap_procbased2;
+ uint64_t vmx_cap_entry;
+ uint64_t vmx_cap_exit;
+ uint64_t vmx_cap_preemption_timer;
+} hvf_vcpu_caps;
+
+struct HVFState {
+ AccelState parent;
+ hvf_slot slots[32];
+ int num_slots;
+
+ hvf_vcpu_caps *hvf_caps;
+};
+extern HVFState *hvf_state;
+
void hvf_set_phys_mem(MemoryRegionSection *, bool);
void assert_hvf_ok(hv_return_t ret);
hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t);