diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-03-22 19:29:07 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-04-18 11:17:27 +0200 |
commit | 1e1e48792a92652af05f59b4df2f643542c71d90 (patch) | |
tree | 55646fa90b796fca6195ac1d35b9467d31f1f42d /include | |
parent | f89761d349999a3d898b35fd85737cf25114d44a (diff) | |
download | qemu-1e1e48792a92652af05f59b4df2f643542c71d90.zip qemu-1e1e48792a92652af05f59b4df2f643542c71d90.tar.gz qemu-1e1e48792a92652af05f59b4df2f643542c71d90.tar.bz2 |
kvm: use configs/ definition to conditionalize debug support
If an architecture adds support for KVM_CAP_SET_GUEST_DEBUG but QEMU does not
have the necessary code, QEMU will fail to build after updating kernel headers.
Avoid this by using a #define in config-target.h instead of KVM_CAP_SET_GUEST_DEBUG.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sysemu/kvm.h | 2 | ||||
-rw-r--r-- | include/sysemu/kvm_int.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index fad9a7e..2cba899 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -224,7 +224,7 @@ void kvm_flush_coalesced_mmio_buffer(void); * calling down to kvm_arch_update_guest_debug after the generic * fields have been set. */ -#ifdef KVM_CAP_SET_GUEST_DEBUG +#ifdef TARGET_KVM_HAVE_GUEST_DEBUG int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap); #else static inline int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h index 882e37e..94488d2 100644 --- a/include/sysemu/kvm_int.h +++ b/include/sysemu/kvm_int.h @@ -78,7 +78,7 @@ struct KVMState struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; bool coalesced_flush_in_progress; int vcpu_events; -#ifdef KVM_CAP_SET_GUEST_DEBUG +#ifdef TARGET_KVM_HAVE_GUEST_DEBUG QTAILQ_HEAD(, kvm_sw_breakpoint) kvm_sw_breakpoints; #endif int max_nested_state_len; |