]> git.proxmox.com Git - mirror_qemu.git/commitdiff
kvm-all: don't use stale dbg_data->cpu
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 10 Oct 2016 15:46:25 +0000 (16:46 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 23 Oct 2016 14:10:59 +0000 (16:10 +0200)
The changes to run_on_cpu and friends mean that all helpers are passed
the CPUState of vCPU they are running on. The conversion missed the
field in commit e0eeb4a21a3ca4b296220ce4449d8acef9de9049 which
introduced bugs.

Reported-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Tested-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20161010154625.14881-1-alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
kvm-all.c

index efb5fe37e2bc34a39db13c59d3204b3010d58c0e..3dcce16ca517e2ba1b929cfc704c3dfdfdd368d9 100644 (file)
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -2215,15 +2215,14 @@ int kvm_sw_breakpoints_active(CPUState *cpu)
 
 struct kvm_set_guest_debug_data {
     struct kvm_guest_debug dbg;
-    CPUState *cpu;
     int err;
 };
 
-static void kvm_invoke_set_guest_debug(CPUState *unused_cpu, void *data)
+static void kvm_invoke_set_guest_debug(CPUState *cpu, void *data)
 {
     struct kvm_set_guest_debug_data *dbg_data = data;
 
-    dbg_data->err = kvm_vcpu_ioctl(dbg_data->cpu, KVM_SET_GUEST_DEBUG,
+    dbg_data->err = kvm_vcpu_ioctl(cpu, KVM_SET_GUEST_DEBUG,
                                    &dbg_data->dbg);
 }