hw/timer/sse-timer: Model the SSE Subsystem System Timer
[qemu/ar7.git] / target / i386 / hvf / hvf-i386.h
blob59cfca8875efc5d9b1f7e37302ec4632ba6e5338
1 /*
2 * QEMU Hypervisor.framework (HVF) support
4 * Copyright 2017 Google Inc
6 * Adapted from target-i386/hax-i386.h:
7 * Copyright (c) 2011 Intel Corporation
8 * Written by:
9 * Jiang Yunhong<yunhong.jiang@intel.com>
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
16 #ifndef HVF_I386_H
17 #define HVF_I386_H
19 #include "qemu/accel.h"
20 #include "sysemu/hvf.h"
21 #include "cpu.h"
22 #include "x86.h"
24 /* hvf_slot flags */
25 #define HVF_SLOT_LOG (1 << 0)
27 typedef struct hvf_slot {
28 uint64_t start;
29 uint64_t size;
30 uint8_t *mem;
31 int slot_id;
32 uint32_t flags;
33 MemoryRegion *region;
34 } hvf_slot;
36 typedef struct hvf_vcpu_caps {
37 uint64_t vmx_cap_pinbased;
38 uint64_t vmx_cap_procbased;
39 uint64_t vmx_cap_procbased2;
40 uint64_t vmx_cap_entry;
41 uint64_t vmx_cap_exit;
42 uint64_t vmx_cap_preemption_timer;
43 } hvf_vcpu_caps;
45 struct HVFState {
46 AccelState parent;
47 hvf_slot slots[32];
48 int num_slots;
50 hvf_vcpu_caps *hvf_caps;
52 extern HVFState *hvf_state;
54 void hvf_set_phys_mem(MemoryRegionSection *, bool);
55 void hvf_handle_io(CPUArchState *, uint16_t, void *, int, int, int);
56 hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t);
58 #ifdef NEED_CPU_H
59 /* Functions exported to host specific mode */
61 /* Host specific functions */
62 int hvf_inject_interrupt(CPUArchState *env, int vector);
63 #endif
65 #endif