From nobody Sun May 5 04:01:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537961663038218.62655269094262; Wed, 26 Sep 2018 04:34:23 -0700 (PDT) Received: from localhost ([::1]:57727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g585F-0000Vv-Td for importer@patchew.org; Wed, 26 Sep 2018 07:34:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g582d-0006Gz-Pm for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:31:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g57sC-00015S-F3 for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:55 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:39973) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g57sC-00013v-4C for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:52 -0400 Received: by mail-wr1-x431.google.com with SMTP id y8-v6so22955437wrh.7 for ; Wed, 26 Sep 2018 04:20:52 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x16-v6sm3506705wro.84.2018.09.26.04.20.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 04:20:49 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A89AA3E0403; Wed, 26 Sep 2018 12:20:48 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c1TtMpNWiIdsGsSiS7XKTtv5r1DIlenBS3nmVtddTDY=; b=Nu1+DBc09obYKqxblu255CGzYSMdR92Hcrlr/M+lr6MoXRnH6RNNjALBhhnQZbmDYp my3li9UK5Uqhw9piLn2wKBEbfes54ppnexkkUnJXTtibW2Cmy0TFSDUs2uXHGNx3IdXo NkZ8E9THwklJB/ky2fxk8PiXYOOwuISqtz+Io= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c1TtMpNWiIdsGsSiS7XKTtv5r1DIlenBS3nmVtddTDY=; b=cG9JP8h7yMH8jhYkHjgjivzAUL+vQaRHwl0MJSaC7fBM6Gjj7PPrGSRHQqdCwcnxha dJEv6uS3tZjdEIyzGMmU/HCWam2Xe/kfEwzQqMun0C9XQEtT1iGxUgZVrAenwJ3KltnD wY4JOVHWOFL2pfDqNrWk3nlqEsQ3bJ9KoNN+TuWzQxWLRcqGbixKEwotdJ/q2YbStlIj 79R0ItGSRKvR5Kczle4Frc2zLfkI62TlPtoj0AbSDKds/emoDmV7yCJSx8NzkdYeBuL5 W//H1eB26VW2a75uAD/a/OpcQf61nAYh1X48naO1YIEJECNWlEN2Dz394qLJGna4lgTt Irag== X-Gm-Message-State: ABuFfohM9ougNYoUoH06tBI7kDsSa+nFsI/Kr3Vf3tvxk/WeQfub+D28 u8a81NapdgbgoRjyscdRC0xxSw== X-Google-Smtp-Source: ACcGV63DvjDrjPZIo8zhjKdX/9bItRlZxnshJ0vS8HHsi109vXtkosQuVwjXYx9jRduSh73dE7E+NQ== X-Received: by 2002:adf:a41c:: with SMTP id d28-v6mr4498326wra.121.1537960850702; Wed, 26 Sep 2018 04:20:50 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 26 Sep 2018 12:20:45 +0100 Message-Id: <20180926112048.17778-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926112048.17778-1-alex.bennee@linaro.org> References: <20180926112048.17778-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 Subject: [Qemu-devel] [PATCH v1 1/4] target/arm64: properly handle DBGVR RESS bits 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: ard.biesheuvel@linaro.org, Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , omair.javaid@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 This only fails with some (broken) versions of gdb but we should treat the top bits of DBGBVR as RESS. As the hardware may have IMPDEF approaches to writes to this register we apply the sign extension when checking breakpoints. Signed-off-by: Alex Benn=C3=A9e --- target/arm/kvm64.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index e0b8246283..80ad07ed0c 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -356,13 +356,23 @@ bool kvm_arm_hw_debug_active(CPUState *cs) return ((cur_hw_wps > 0) || (cur_hw_bps > 0)); } =20 +/* + * We shouldn't rely on gdb correctly setting the top bits of DBGBVR + * and the HW lists the top bits a RESS - sign-extending the top bit + * of the VA address. As it is IMPDEF if the write is either a sign + * extension or kept as is we might fix it up before we compare with + * the correctly reported and sign extended address. + */ + static bool find_hw_breakpoint(CPUState *cpu, target_ulong pc) { int i; =20 for (i =3D 0; i < cur_hw_bps; i++) { HWBreakpoint *bp =3D get_hw_bp(i); - if (bp->bvr =3D=3D pc) { + target_ulong bvr =3D bp->bvr; + bvr |=3D extract64(bvr, 52, 1) ? MAKE_64BIT_MASK(53, 11) : 0; + if (bvr =3D=3D pc) { return true; } } --=20 2.17.1 From nobody Sun May 5 04:01:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537961670518354.9600398953555; Wed, 26 Sep 2018 04:34:30 -0700 (PDT) Received: from localhost ([::1]:57728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g585G-0000W3-5G for importer@patchew.org; Wed, 26 Sep 2018 07:34:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g582a-0006IA-VJ for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:31:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g57sD-00016S-34 for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:55 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:53050) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g57sC-00014t-S8 for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:53 -0400 Received: by mail-wm1-x329.google.com with SMTP id l7-v6so1858372wme.2 for ; Wed, 26 Sep 2018 04:20:52 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y128-v6sm5013297wmy.26.2018.09.26.04.20.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 04:20:49 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id BBFF43E0442; Wed, 26 Sep 2018 12:20:48 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hvcbVe1lmx2/vFZx9MUhWU5Mc+LZnSeTTBY8pimf380=; b=XNz983fT2OZXd2Cx42GZrN3TMAsNfPNP8YiC1Yx5QZnlXcjSMeT8dnxUjcyQsQ0/IA GOhatbXF3ypfIiZ4uhPrtZHosCub++7DLDmIZ2XseeraKPc1UqpFy+do2Idsk2fIdsuN B6yaZakY1D2b9/a0u4fhpSR/tasRhGiRxFcDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hvcbVe1lmx2/vFZx9MUhWU5Mc+LZnSeTTBY8pimf380=; b=bLfN67MLgJC5xr6FP3r1zfn1CRIu/46yn5LVZytHYasm27DQYGgn5xKEkggsz90faZ A6Lwx68K4qm2w3OPImXvWEdbRxT6X3Md5orhGNppf5HpqYYEr1ypR67fe7zAv2V0zTl4 C1F7roOcvwewFzKRPELoTtOhW6fR3xx+IeHbmYvVW6HEyLXngjPVqNwY9B3I0yL373i8 cJWKfw1W21K0EYK+BMpM521W2/V1bEcXX4ioN2fnsoWaF4CLMNF0Bz8BuzHO1DgTIR55 awIJnty9CklWUN6s+nLMHZ5H8fw3UZ6p/ERHtGrkbt6cyF+Eu96IElr981gysglgnx2T Y+gA== X-Gm-Message-State: ABuFfohOJyAx/ilAFwzjk2IOEkKlCT9cNZydIs+Lx9T94ZKHjLDZH/fI xs8hHaeC5UCD+UZfGM9avmE+qQ== X-Google-Smtp-Source: ACcGV60iq3iDDGEzVNdaUOYdarZqatKdrgZ63YHSViNiL48CNGtoLA/UByu+zCcOMDhvMewqMdWT6A== X-Received: by 2002:a1c:3351:: with SMTP id z78-v6mr4100123wmz.23.1537960851447; Wed, 26 Sep 2018 04:20:51 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 26 Sep 2018 12:20:46 +0100 Message-Id: <20180926112048.17778-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926112048.17778-1-alex.bennee@linaro.org> References: <20180926112048.17778-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::329 Subject: [Qemu-devel] [PATCH v1 2/4] target/arm64: hold BQL when calling do_interrupt() 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: ard.biesheuvel@linaro.org, Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , omair.javaid@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Fix the assertion failure when running interrupts. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell --- target/arm/kvm64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 80ad07ed0c..346e1f1a73 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -984,7 +984,9 @@ bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debu= g_exit_arch *debug_exit) cs->exception_index =3D EXCP_BKPT; env->exception.syndrome =3D debug_exit->hsr; env->exception.vaddress =3D debug_exit->far; + qemu_mutex_lock_iothread(); cc->do_interrupt(cs); + qemu_mutex_unlock_iothread(); =20 return false; } --=20 2.17.1 From nobody Sun May 5 04:01:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537961917404999.2666147461607; Wed, 26 Sep 2018 04:38:37 -0700 (PDT) Received: from localhost ([::1]:57758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g589M-0003tn-8V for importer@patchew.org; Wed, 26 Sep 2018 07:38:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g582a-0006Gr-G7 for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:31:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g57sD-000173-Kh for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:55 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:53054) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g57sD-00015o-Ar for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:53 -0400 Received: by mail-wm1-x32d.google.com with SMTP id l7-v6so1858408wme.2 for ; Wed, 26 Sep 2018 04:20:53 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j27-v6sm6139787wmc.17.2018.09.26.04.20.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 04:20:49 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id CEDC73E0489; Wed, 26 Sep 2018 12:20:48 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fj5xCb/gmUTk4UnTjYc00kyhkvcZJIju6oudisUoi/w=; b=iyFuw28dx9Hu903wsLhHW0U1YTHAkPvbFxLUPGYMtrNcOd+uGDvpsinAyX+3d9ppgC MPxsPW2lIrKX3EcbowooBouHpleML0lmE6JzjKWyE8bwJXQ4zjOOgyrV4DnbqOY008jZ 2OiExnBAeVUVIWT8udRLQfa8QklitYbi/2clQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fj5xCb/gmUTk4UnTjYc00kyhkvcZJIju6oudisUoi/w=; b=p4wKBVIiV1LloHycvUIVEXVxqCzvkxO0TP/HK6sK36puowve/axWzr/yQDpvXch8Xe r35Yk1UgUJFD1TvSsa5k3odfqihNPxD2ORY7zoRzzTEcysQ+K+metgQc+dvvZJL65H61 oRMF2TKcJnlwLMZmd2MuI2TyO8e9TFq2rZ0zLqLJKdBs9bCdwkirOcjBGWbroyvxPrju pNUKyopH+rS+OD7EnnhsPlf6CMnnZKFiHN/kupIYUCIiMrF7UUxqKb2v3+6tJqH0I4b6 2YLXx4rldkhtDnDm+dvToVtxtxQ99JcVjE6m2JZzdnSegAaitrdw0W8cwcBiJr+lmxkS +dSQ== X-Gm-Message-State: ABuFfojX1rQhaPTIayhOQeyHqVk9IrWfPHWOfHZqipzJ8zv0+/ebr1yw iW8jqRt9KDmn/KIIsn8NK+gBCA== X-Google-Smtp-Source: ACcGV627H1utNsOgih1IBPDh3Yh3ev3IgzkZjNs7Rff5RZoJRLbwGbQaFbKBWUIWOYMxlaphBj0EoA== X-Received: by 2002:a1c:5f54:: with SMTP id t81-v6mr4180726wmb.67.1537960852270; Wed, 26 Sep 2018 04:20:52 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 26 Sep 2018 12:20:47 +0100 Message-Id: <20180926112048.17778-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926112048.17778-1-alex.bennee@linaro.org> References: <20180926112048.17778-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32d Subject: [Qemu-devel] [PATCH v1 3/4] target/arm64: kvm debug set target_el when passing exception to guest 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: ard.biesheuvel@linaro.org, Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , omair.javaid@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 When we are debugging the guest all exception come our way but might be for the guests own debug exceptions. We use the ->do_interrupt() infrastructure to do this however we are missing a full setup of the exception structure causing an assert later down the line. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell --- target/arm/kvm64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 346e1f1a73..9ceff1884c 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -984,6 +984,7 @@ bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debu= g_exit_arch *debug_exit) cs->exception_index =3D EXCP_BKPT; env->exception.syndrome =3D debug_exit->hsr; env->exception.vaddress =3D debug_exit->far; + env->exception.target_el =3D 1; qemu_mutex_lock_iothread(); cc->do_interrupt(cs); qemu_mutex_unlock_iothread(); --=20 2.17.1 From nobody Sun May 5 04:01:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537961790755278.46852444764477; Wed, 26 Sep 2018 04:36:30 -0700 (PDT) Received: from localhost ([::1]:57749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g587J-0002Hg-PB for importer@patchew.org; Wed, 26 Sep 2018 07:36:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g582a-0006Gn-Np for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:31:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g57sE-00018K-9D for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:55 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:40568) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g57sE-00016l-1K for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:54 -0400 Received: by mail-wm1-x32a.google.com with SMTP id o2-v6so1869858wmh.5 for ; Wed, 26 Sep 2018 04:20:53 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b74-v6sm6238027wma.8.2018.09.26.04.20.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 04:20:49 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E10203E0504; Wed, 26 Sep 2018 12:20:48 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3OekAxObBHpTrOsSKqBZXC3Oh8VuN0JddNwe5XXDZoE=; b=DcdLK8ohy5qBS6wmW0HJ36dmS9V6ZoK4D2UhU+roiNL5hJO8PrCNlmls8CuDo8sYwU nHSKjHURc1EfWThJPu3a9U5ftCzuekRu/XwxnIA9HNRvhIgJ5umJ4+gB4bndRAgXpAHB ab6JZWMqgWqGlWfIAGOZKwRFXO7Mg1vmVAGy0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3OekAxObBHpTrOsSKqBZXC3Oh8VuN0JddNwe5XXDZoE=; b=Wz1sZJIG5urmZh/KiXq0GiyZyA1vgZz1yj8YeqYI99LmqIOUfznsya4i8U1WjZvLb4 t5z747nFEMbmqxlSfwPp1kt9wks1peDMgwVQ49UwncXv0QY4PVGl6VtLIsJfC3fZlyTx osmO2bAkMZL1DYxpPkm/w0Py2P2srEqhaRn+iFLJykmm6Gfynh6nmFU/eUoEaqjm60i0 epFj0Ss3Dk/vtAJPsTOn1i52ZvnFhFIwOczjqtxvhWw4nQNIKIndhh4s1vnWo5Y+ahUT B367GVo/RlK1D5l34x4MCreJ75YT+D9QI/8gfd54wXOPqV3EyBaq/+VYcich82Q62A2m jsFA== X-Gm-Message-State: ABuFfohIP2wRYc5rCJ/eAFZha+5QWJKnxv3eTzGMFQSGEr1uTXidVs0m eAenVyMD4gdHGkkrEVkIvl1QZA== X-Google-Smtp-Source: ACcGV60EvsZ0qlL0Eh0mJUZsl3SgcuRJb+KUgXTjoGAPyPmPvLBiN7a4ylTFqkdnVrwBzb3tfL+w+g== X-Received: by 2002:a1c:ef15:: with SMTP id n21-v6mr2625706wmh.151.1537960852952; Wed, 26 Sep 2018 04:20:52 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 26 Sep 2018 12:20:48 +0100 Message-Id: <20180926112048.17778-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926112048.17778-1-alex.bennee@linaro.org> References: <20180926112048.17778-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a Subject: [Qemu-devel] [PATCH v1 4/4] tests/guest-debug: fix scoping of failcount 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: ard.biesheuvel@linaro.org, qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , omair.javaid@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 You should declare you are using a global version of a variable before you attempt to modify it in a function. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell --- tests/guest-debug/test-gdbstub.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/guest-debug/test-gdbstub.py b/tests/guest-debug/test-gdb= stub.py index 474d2c5c65..7bfc95b187 100644 --- a/tests/guest-debug/test-gdbstub.py +++ b/tests/guest-debug/test-gdbstub.py @@ -16,6 +16,7 @@ def report(cond, msg): print ("PASS: %s" % (msg)) else: print ("FAIL: %s" % (msg)) + global failcount failcount +=3D 1 =20 =20 --=20 2.17.1