mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
ce7f5b1c50
commit
a1477da3dd
7 changed files with 834 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue