diff options
author | Glauber Costa <glommer@redhat.com> | 2009-07-14 11:35:18 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2009-07-14 19:37:30 -0300 |
commit | 07b6cfa3edabfb6ccc9dd87950466193548801ab (patch) | |
tree | 1003c49ee6f2f1a70701b6919191c68b5bcf632a /kvm-all.c | |
parent | use kvm_upstream sw_breakpoints structure (diff) | |
download | qemu-kvm-07b6cfa3edabfb6ccc9dd87950466193548801ab.tar.gz qemu-kvm-07b6cfa3edabfb6ccc9dd87950466193548801ab.tar.bz2 qemu-kvm-07b6cfa3edabfb6ccc9dd87950466193548801ab.zip |
reuse upstream breakpoint code
Drop KVM_UPSTREAM around functions we intend to reuse.
This allow us to share code in kvm-all.c, that is equal in qemu-kvm.c
Signed-off-by: Glauber Costa <glommer@redhat.com>
CC: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -873,6 +873,8 @@ void kvm_setup_guest_memory(void *start, size_t size) } } +#endif /* KVM_UPSTREAM */ + #ifdef KVM_CAP_SET_GUEST_DEBUG struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env, target_ulong pc) @@ -891,6 +893,7 @@ int kvm_sw_breakpoints_active(CPUState *env) return !TAILQ_EMPTY(&env->kvm_state->kvm_sw_breakpoints); } +#ifdef KVM_UPSTREAM int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap) { struct kvm_guest_debug dbg; @@ -904,6 +907,7 @@ int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap) return kvm_vcpu_ioctl(env, KVM_SET_GUEST_DEBUG, &dbg); } +#endif int kvm_insert_breakpoint(CPUState *current_env, target_ulong addr, target_ulong len, int type) @@ -1028,6 +1032,5 @@ void kvm_remove_all_breakpoints(CPUState *current_env) { } #endif /* !KVM_CAP_SET_GUEST_DEBUG */ -#endif #include "qemu-kvm.c" |