From nobody Wed Apr 16 14:15:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 155077574754386.76249385620383; Thu, 21 Feb 2019 11:02:27 -0800 (PST) Received: from localhost ([127.0.0.1]:36933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwtc0-00043Q-GD for importer@patchew.org; Thu, 21 Feb 2019 14:02:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwtXo-0008S2-UQ for qemu-devel@nongnu.org; Thu, 21 Feb 2019 13:58:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwtXn-0007Qv-1h for qemu-devel@nongnu.org; Thu, 21 Feb 2019 13:58:04 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:54422) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwtXl-0007HA-4E for qemu-devel@nongnu.org; Thu, 21 Feb 2019 13:58:02 -0500 Received: by mail-wm1-x32e.google.com with SMTP id a62so10640227wmh.4 for ; Thu, 21 Feb 2019 10:57:46 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c18sm29065085wre.32.2019.02.21.10.57.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 10:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nIehuVRXgnY3rhKhPHuNiPjunbQ4Fl2spBEKFWr6ckI=; b=LMIUQU+JyIyc9eNnNjnDlMfJevRS9cTeuepOTygmWxeiVxbppwG5Bzpa/e8cb6tgrv /5O7gNXA+jaxh4MoFcIhOV4BRP5RmlKhhWcEp/nVYS7ocNQoIr/Llg9jo23nQ6BiFxNC w5DIu7BbsouIKAiIW8+nj512G8Is2t2+SQ50uaAzgmovyOqIXQFnAIQF4iJZvCEI7ncn xsUXHYEyn95bI4d22v/jzS2j/hMpRcN9VR3KHCKdHnNBnIsZOH1y1Z9ly+iAMptRexyR aWAl8ugB9L35LM8xceCY/zToyMyx7aMSZv3XjnPDxydVqYSsK3w86HR+T2limxmEMHPh iJGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nIehuVRXgnY3rhKhPHuNiPjunbQ4Fl2spBEKFWr6ckI=; b=DdvH5UhktmLWvdxzMdGbMUdfQ5+EYZLUNw1eBLUNsmpNNIoOB0a2saHrb690LPZ916 AKmUJJ9JMT2iSMoX6IyK5DgKNkvLAvQ/SXrjINlDUEC6LtHMMhy8t/wiyVT/kVN625/Z 6bQSGRA2PsvjdEopnqtdYadZWMp1SRmCkv1sFy3qoJX2TcXVJtF/qwUHvr5Rqw+JoWF4 bxRTFPSjZlqYFWsQErZ/N2W5IziJBxiN9FUGuDbapzQaAPMyhGpE8r2VW1lVkvwA6Prn SSNd/vYBUs7qiiLRpuZ0yI/4g41AHfvxOkKK6SoTmJ5J1o7Uv0o3k7paKuOUqLsc1XQ5 mpdA== X-Gm-Message-State: AHQUAubId1a+kfsfjc3dITgRF0OnVCXTccc0UG1VIofnGJUiDuVMzh67 kn8/IysVWTruiyVXR/lBApeJk20ziWg= X-Google-Smtp-Source: AHgI3IYgGYAcFr0eM3giInS6jbOl2eiilIZtN8XinlTJLUYied5TXHDUNFQsUum967NPAoQoW8onEA== X-Received: by 2002:a1c:4406:: with SMTP id r6mr12951wma.114.1550775465356; Thu, 21 Feb 2019 10:57:45 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 21 Feb 2019 18:57:21 +0000 Message-Id: <20190221185739.25362-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190221185739.25362-1-peter.maydell@linaro.org> References: <20190221185739.25362-1-peter.maydell@linaro.org> MIME-Version: 1.0 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::32e Subject: [Qemu-devel] [PULL 03/21] target/arm: Stop unintentional sign extension in pmu_init 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Aaron Lindsay OS This was introduced by commit bf8d09694ccc07487cd73d7562081fdaec3370c8 target/arm: Don't clear supported PMU events when initializing PMCEID1 and identified by Coverity (CID 1398645). Signed-off-by: Aaron Lindsay Reported-by: Peter Maydell Message-id: 20190219144621.450-1-aaron@os.amperecomputing.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index fe054897c78..c2630fa1ea4 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -1167,7 +1167,7 @@ void pmu_init(ARMCPU *cpu) =20 if (cnt->supported(&cpu->env)) { supported_event_map[cnt->number] =3D i; - uint64_t event_mask =3D 1 << (cnt->number & 0x1f); + uint64_t event_mask =3D 1ULL << (cnt->number & 0x1f); if (cnt->number & 0x20) { cpu->pmceid1 |=3D event_mask; } else { --=20 2.20.1