From patchwork Mon Oct 24 13:46:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 78960 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp2587947qge; Mon, 24 Oct 2016 06:50:18 -0700 (PDT) X-Received: by 10.159.38.41 with SMTP id 38mr6849551uag.26.1477317018338; Mon, 24 Oct 2016 06:50:18 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u9si851028uau.240.2016.10.24.06.50.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 24 Oct 2016 06:50:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:46865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byfdp-00056v-45 for patch@linaro.org; Mon, 24 Oct 2016 09:50:17 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nYELR0W61EuarsDbzgb+qLyVP47Rx3MQBkBVTdqtDKg=; b=yjH3VaVaLGNyUqRRbG113/8jBYXPQmEfYXlb7P9PR5TAOoFeBEAgwrrJCd3FMhjmL6 KTbYcqEWSTtLj0YKwoxIVsVdBROf/v5UYtDcwEJjUlMrqRjfMsLKlu1C1VTyLKcwbsac uVGp24U3JUETjzWXHq3AFimpdFXmAYVQmklMbaTWhf/aTYqWajZwxUIKEpuZbJ8U/pKZ aYVpW+B9/KyOgGmmdDGdK33cFMoUC0/9O7QFxgl5VyrhGRRUyGA3eezFjm/PIKN9KO/G Au6oqHxGkckEO5bJxJSysAdXuJOwdd7lYp8A2KcTUe8E5IOJyt2Lk66DkzF3a78pt7jl 1JXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=nYELR0W61EuarsDbzgb+qLyVP47Rx3MQBkBVTdqtDKg=; b=JQji5s09vfZG7wjFkKJtebJoSZZM8dt4sumeuV8AA8SbTz04xvdniGX1m3O3kKljf0 Rl8bXVnvAQ2hHS+5128tPEKIg6S+Kg+HGDuVi9D1rHJV2dYfs7a/omicZiX5nA18Yslp StKe50aVHYXCOI8PXrArAgaKzoMrZeSe3UqhqagxVgjjf3S1X2uU+foKDgweZoYUu2+U ZR6H5LMNOcUd0MTMSURE127D2BgQfNTgRMkskHVYL7FuCuW+yIYBfQvHWqKw8Ku8YWM5 PqIr4REy9+71qrro+9ZU5K4sQ7B68K9iF4K9bTX8/8qR32Kxs+Mxjp0X7hv4cEWAyKDt iiug== X-Gm-Message-State: AA6/9RmuQEQBHkt5GhFfpcRzw9YDAYS84nGxww0ixLZT8/yXASLQHVdbqXAjmZzq667BlQ== X-Received: by 10.28.96.85 with SMTP id u82mr16200140wmb.37.1477316859428; Mon, 24 Oct 2016 06:47:39 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-246-178.clienti.tiscali.it. [78.12.246.178]) by smtp.gmail.com with ESMTPSA id us3sm19434867wjb.32.2016.10.24.06.47.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2016 06:47:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 24 Oct 2016 15:46:46 +0200 Message-Id: <1477316855-42218-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL 01/50] kvm-all: don't use stale dbg_data->cpu X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 1.8.3.1 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); }