master
h 26 lines 887 Bytes
Raw
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #ifndef SYSTEM_WHPX_COMMON_H
3 #define SYSTEM_WHPX_COMMON_H
4
5 struct AccelCPUState {
6 bool window_registered;
7 int window_priority;
8 bool interruptable;
9 bool ready_for_pic_interrupt;
10 uint64_t tpr;
11 bool interruption_pending;
12 /* Must be the last field as it may have a tail */
13 WHV_RUN_VP_EXIT_CONTEXT exit_ctx;
14 };
15
16 int whpx_first_vcpu_starting(CPUState *cpu);
17 int whpx_last_vcpu_stopping(CPUState *cpu);
18 void whpx_memory_init(void);
19 struct whpx_breakpoint *whpx_lookup_breakpoint_by_addr(uint64_t address);
20 void whpx_flush_cpu_state(CPUState *cpu);
21 void whpx_get_reg(CPUState *cpu, WHV_REGISTER_NAME reg, WHV_REGISTER_VALUE* val);
22 void whpx_set_reg(CPUState *cpu, WHV_REGISTER_NAME reg, WHV_REGISTER_VALUE val);
23
24 /* On x64: same as WHvX64ExceptionTypeDebugTrapOrFault */
25 #define WHPX_INTERCEPT_DEBUG_TRAPS 1
26 #endif