From 3c0ed2a342e5acb97bdd2c7b64d33a904ad75940 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Benn=C3=A9e?= Date: Mon, 10 Oct 2016 16:46:25 +0100 Subject: [PATCH] kvm-all: don't use stale dbg_data->cpu MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Tested-by: Claudio Imbrenda Signed-off-by: Alex Bennée Message-Id: <20161010154625.14881-1-alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini --- kvm-all.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index efb5fe37e2..3dcce16ca5 100644 --- 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); } -- 2.39.5