Received: from eggs.gnu.org ([2001:4830:134:3::10]:46352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byfbL-0003sS-M6 for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:47:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byfbI-0006Du-Nz for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:47:43 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1byfbI-0006DU-Hk for qemu-devel@nongnu.org; Mon, 24 Oct 2016 09:47:40 -0400 Received: by mail-wm0-x242.google.com with SMTP id d128so9934128wmf.0 for ; Mon, 24 Oct 2016 06:47:40 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 24 Oct 2016 15:46:46 +0200 Message-Id: <1477316855-42218-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1477316855-42218-1-git-send-email-pbonzini@redhat.com> References: <1477316855-42218-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 01/50] kvm-all: don't use stale dbg_data->cpu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= From: Alex Bennée 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 efb5fe3..3dcce16 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); } -- 1.8.3.1