summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kvm-all.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 7dcc553..f50c31c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -938,7 +938,13 @@ struct kvm_set_guest_debug_data {
static void kvm_invoke_set_guest_debug(void *data)
{
struct kvm_set_guest_debug_data *dbg_data = data;
- dbg_data->err = kvm_vcpu_ioctl(dbg_data->env, KVM_SET_GUEST_DEBUG, &dbg_data->dbg);
+ CPUState *env = dbg_data->env;
+
+ if (env->kvm_state->regs_modified) {
+ kvm_arch_put_registers(env);
+ env->kvm_state->regs_modified = 0;
+ }
+ dbg_data->err = kvm_vcpu_ioctl(env, KVM_SET_GUEST_DEBUG, &dbg_data->dbg);
}
int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap)
OpenPOWER on IntegriCloud