aboutsummaryrefslogtreecommitdiff
path: root/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-03-15 11:47:45 +0200
committerAvi Kivity <avi@redhat.com>2009-03-15 11:47:45 +0200
commit80384df5fdd744d94c3bd0d0a639a282315d3ddf (patch)
tree10ab961e243b94a6dbbc00fca605cb1784dbdd27 /kvm.h
parentMerge branch 'qemu-cvs' (diff)
parentMake the ELF loader aware of backwards compatibility (diff)
downloadqemu-kvm-80384df5fdd744d94c3bd0d0a639a282315d3ddf.tar.gz
qemu-kvm-80384df5fdd744d94c3bd0d0a639a282315d3ddf.tar.bz2
qemu-kvm-80384df5fdd744d94c3bd0d0a639a282315d3ddf.zip
Merge branch 'qemu-cvs'
* qemu-cvs: (29 commits) Make the ELF loader aware of backwards compatibility temporarily disable logging around pci config writes (Avi Kivity) stop dirty logging while updating cirrus bank memory (Glauber Costa) Add missing file Update changelog qemu:virtio-net: Check return size on the correct sg list (Alex Williamson) make qemu_announce_self handle non contiguous net tables (Marcelo Tosatti) Replace asprintf() with snprintf() in vnc.c ("Daniel P. Berrange") monitor: Provide empty command as final history entry (Jan Kiszka) Add and use remaining #defines for PCI device IDs (Stuart Brady) remove is_graphic_console from vga.c (Stefano Stabellini) DisplayAllocator interface (Stefano Stabellini) tcg/x86_64: add bswap16_i{32,64} and bswap32_i64 ops tcg/x86: add bswap16_i32 ops target-i386: use the new bswap* TCG ops target-ppc: use the new bswap* TCG ops tcg: update README wrt recent bswap changes tcg: add _tl aliases to bswap16/32/64 TCG ops tcg: add bswap16_i64 and bswap32_i64 TCG ops tcg: optimize tcg_gen_bswap16_i32 ... Conflicts: qemu/gdbstub.c qemu/hw/apic.c qemu/hw/vga.c qemu/monitor.c Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm.h')
-rw-r--r--kvm.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/kvm.h b/kvm.h
index 05a13eebc..4664cab05 100644
--- a/kvm.h
+++ b/kvm.h
@@ -15,6 +15,7 @@
#define QEMU_KVM_H
#include "config.h"
+#include "sys-queue.h"
#ifdef KVM_UPSTREAM
@@ -51,6 +52,13 @@ int kvm_has_sync_mmu(void);
int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
+int kvm_insert_breakpoint(CPUState *current_env, target_ulong addr,
+ target_ulong len, int type);
+int kvm_remove_breakpoint(CPUState *current_env, target_ulong addr,
+ target_ulong len, int type);
+void kvm_remove_all_breakpoints(CPUState *current_env);
+int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap);
+
/* internal API */
struct KVMState;
@@ -78,6 +86,49 @@ int kvm_arch_init(KVMState *s, int smp_cpus);
int kvm_arch_init_vcpu(CPUState *env);
+struct kvm_guest_debug;
+struct kvm_debug_exit_arch;
+
+struct kvm_sw_breakpoint {
+ target_ulong pc;
+ target_ulong saved_insn;
+ int use_count;
+ TAILQ_ENTRY(kvm_sw_breakpoint) entry;
+};
+
+TAILQ_HEAD(kvm_sw_breakpoint_head, kvm_sw_breakpoint);
+
+int kvm_arch_debug(struct kvm_debug_exit_arch *arch_info);
+
+struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
+ target_ulong pc);
+
+int kvm_sw_breakpoints_active(CPUState *env);
+
+int kvm_arch_insert_sw_breakpoint(CPUState *current_env,
+ struct kvm_sw_breakpoint *bp);
+int kvm_arch_remove_sw_breakpoint(CPUState *current_env,
+ struct kvm_sw_breakpoint *bp);
+int kvm_arch_insert_hw_breakpoint(target_ulong addr,
+ target_ulong len, int type);
+int kvm_arch_remove_hw_breakpoint(target_ulong addr,
+ target_ulong len, int type);
+void kvm_arch_remove_all_hw_breakpoints(void);
+
+void kvm_arch_update_guest_debug(CPUState *env, struct kvm_guest_debug *dbg);
+
+/* generic hooks - to be moved/refactored once there are more users */
+
+static inline void cpu_synchronize_state(CPUState *env, int modified)
+{
+ if (kvm_enabled()) {
+ if (modified)
+ kvm_arch_put_registers(env);
+ else
+ kvm_arch_get_registers(env);
+ }
+}
+
#endif
#endif