aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Graf <agraf@csgraf.de>2021-09-16 17:53:58 +0200
committerPeter Maydell <peter.maydell@linaro.org>2021-09-20 09:57:03 +0100
commita1477da3ddeb1b76adb71af7b5c46a18120dc952 (patch)
tree5212fec6d8df4695264bc39a34431a9820706788 /include
parentce7f5b1c5027d73aa7c30820ef2b23ef4d72d20d (diff)
downloadqemu-a1477da3ddeb1b76adb71af7b5c46a18120dc952.zip
qemu-a1477da3ddeb1b76adb71af7b5c46a18120dc952.tar.gz
qemu-a1477da3ddeb1b76adb71af7b5c46a18120dc952.tar.bz2
hvf: Add Apple Silicon support
With Apple Silicon available to the masses, it's a good time to add support for driving its virtualization extensions from QEMU. This patch adds all necessary architecture specific code to get basic VMs working, including save/restore. Known limitations: - WFI handling is missing (follows in later patch) - No watchpoint/breakpoint support Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Sergio Lopez <slp@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20210916155404.86958-5-agraf@csgraf.de [PMM: added missing #include] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/hvf_int.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/sysemu/hvf_int.h b/include/sysemu/hvf_int.h
index 0466106..7c245c7 100644
--- a/include/sysemu/hvf_int.h
+++ b/include/sysemu/hvf_int.h
@@ -11,7 +11,11 @@
#ifndef HVF_INT_H
#define HVF_INT_H
+#ifdef __aarch64__
+#include <Hypervisor/Hypervisor.h>
+#else
#include <Hypervisor/hv.h>
+#endif
/* hvf_slot flags */
#define HVF_SLOT_LOG (1 << 0)
@@ -40,11 +44,14 @@ struct HVFState {
int num_slots;
hvf_vcpu_caps *hvf_caps;
+ uint64_t vtimer_offset;
};
extern HVFState *hvf_state;
struct hvf_vcpu_state {
- int fd;
+ uint64_t fd;
+ void *exit;
+ bool vtimer_masked;
};
void assert_hvf_ok(hv_return_t ret);
@@ -55,5 +62,6 @@ int hvf_vcpu_exec(CPUState *);
hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t);
int hvf_put_registers(CPUState *);
int hvf_get_registers(CPUState *);
+void hvf_kick_vcpu_thread(CPUState *cpu);
#endif