]> git.proxmox.com Git - mirror_qemu.git/blame - include/sysemu/hvf_int.h
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into...
[mirror_qemu.git] / include / sysemu / hvf_int.h
CommitLineData
d57bc3c1
AG
1/*
2 * QEMU Hypervisor.framework (HVF) support
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 *
7 */
8
9/* header to be included in HVF-specific code */
10
11#ifndef HVF_INT_H
12#define HVF_INT_H
13
a1477da3
AG
14#ifdef __aarch64__
15#include <Hypervisor/Hypervisor.h>
16#else
d57bc3c1 17#include <Hypervisor/hv.h>
a1477da3 18#endif
d57bc3c1 19
861457ce
AG
20/* hvf_slot flags */
21#define HVF_SLOT_LOG (1 << 0)
22
23typedef struct hvf_slot {
24 uint64_t start;
25 uint64_t size;
26 uint8_t *mem;
27 int slot_id;
28 uint32_t flags;
29 MemoryRegion *region;
30} hvf_slot;
31
32typedef struct hvf_vcpu_caps {
33 uint64_t vmx_cap_pinbased;
34 uint64_t vmx_cap_procbased;
35 uint64_t vmx_cap_procbased2;
36 uint64_t vmx_cap_entry;
37 uint64_t vmx_cap_exit;
38 uint64_t vmx_cap_preemption_timer;
39} hvf_vcpu_caps;
40
41struct HVFState {
42 AccelState parent;
43 hvf_slot slots[32];
44 int num_slots;
45
46 hvf_vcpu_caps *hvf_caps;
a1477da3 47 uint64_t vtimer_offset;
861457ce
AG
48};
49extern HVFState *hvf_state;
50
b533450e 51struct hvf_vcpu_state {
a1477da3
AG
52 uint64_t fd;
53 void *exit;
54 bool vtimer_masked;
219c101f 55 sigset_t unblock_ipi_mask;
b533450e
AG
56};
57
d57bc3c1 58void assert_hvf_ok(hv_return_t ret);
ce7f5b1c 59int hvf_arch_init(void);
cfe58455
AG
60int hvf_arch_init_vcpu(CPUState *cpu);
61void hvf_arch_vcpu_destroy(CPUState *cpu);
d662ede2 62int hvf_vcpu_exec(CPUState *);
358e7505
AG
63hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t);
64int hvf_put_registers(CPUState *);
65int hvf_get_registers(CPUState *);
a1477da3 66void hvf_kick_vcpu_thread(CPUState *cpu);
d57bc3c1
AG
67
68#endif