Hyper-V always has CPUID[1:EDX].APIC set, even when the APIC isn't enabled yet. Work around this by also using the APICBASE trap for kernel-irqchip=on. Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr> Link: https://lore.kernel.org/r/20260422214225.2242-16-mohamed@unpredictable.fr Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
27 lines
887 B
C
27 lines
887 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef SYSTEM_WHPX_COMMON_H
|
|
#define SYSTEM_WHPX_COMMON_H
|
|
|
|
struct AccelCPUState {
|
|
bool window_registered;
|
|
int window_priority;
|
|
bool interruptable;
|
|
bool ready_for_pic_interrupt;
|
|
uint64_t tpr;
|
|
bool interruption_pending;
|
|
/* Must be the last field as it may have a tail */
|
|
WHV_RUN_VP_EXIT_CONTEXT exit_ctx;
|
|
};
|
|
|
|
int whpx_first_vcpu_starting(CPUState *cpu);
|
|
int whpx_last_vcpu_stopping(CPUState *cpu);
|
|
void whpx_memory_init(void);
|
|
struct whpx_breakpoint *whpx_lookup_breakpoint_by_addr(uint64_t address);
|
|
void whpx_flush_cpu_state(CPUState *cpu);
|
|
void whpx_get_reg(CPUState *cpu, WHV_REGISTER_NAME reg, WHV_REGISTER_VALUE* val);
|
|
void whpx_set_reg(CPUState *cpu, WHV_REGISTER_NAME reg, WHV_REGISTER_VALUE val);
|
|
|
|
/* On x64: same as WHvX64ExceptionTypeDebugTrapOrFault */
|
|
#define WHPX_INTERCEPT_DEBUG_TRAPS 1
|
|
#endif
|