From nobody Wed Apr 16 13:11:28 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 1553524623186631.0018457616015; Mon, 25 Mar 2019 07:37:03 -0700 (PDT) Received: from localhost ([127.0.0.1]:43504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Qih-0003rQ-7r for importer@patchew.org; Mon, 25 Mar 2019 10:36:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Qdz-0000Sa-Ie for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:32:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8Qdu-00023J-Pw for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:32:07 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:41217) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h8Qdu-00022p-Hr for qemu-devel@nongnu.org; Mon, 25 Mar 2019 10:32:02 -0400 Received: by mail-wr1-x433.google.com with SMTP id r4so2729178wrq.8 for ; Mon, 25 Mar 2019 07:32:02 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id j1sm18858048wme.4.2019.03.25.07.32.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2019 07:32:00 -0700 (PDT) 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=APam0gAPkkPIy3X5xt8ZSMQ77AVw+wdEAQ36/sWjIMs=; b=c0SCoaU9LB//cnKqQnc6PJUBbnIZV/cFDTIn97vqqeMKRdgI/8mjFpPoZWMGQz1hvO E4n9xUWV4I6vBt3ofePYHmpBiGxVCTdBptGdgXaRg9HT5Ya+vTfU8dCV666Vf5nC1Xoe Ds3yTPqDvBAgJLROkkGNELMYtCQcKgw1XfyjO4+mRIYuNyv9aEdVTG2NjHa1sabm9uz8 Rdvgg5MA/oUCyVM7V6AueIxVn9NuEbnBdkbnMfvY1BsPdhrtKdPWKmo25eP9Ari7NIfK NmQtuu81wb6k7ESm16X15wUWaaogBhYPjwjoO2WWpDEN0xUDCdGt98d6897xCIGMMB9v Lb2A== 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=APam0gAPkkPIy3X5xt8ZSMQ77AVw+wdEAQ36/sWjIMs=; b=PlwuXCA/GJ7eoT/37EJ3wCCLaUchhoZNNDI4jCSTZFx542jfA1yOmSk+WQmHw62KPN Z7dpDB+7U1YCYTYGK+EUnzFv1PQTBGKav9expPzediCOwLE4uHUt+XkzuIWLFVvCpDRu GSI+alq16Laf+6ZwwdacH+po0tZczBgz15BUJsNbHWURUG+Mu6TyPw7ZCN0Llf1biwwS 4BqIGxw5neaSMGfQYdID0v3l9Bn9+w+asa33IvyTUIi35+c5Tgb/X8TpDrrH+lsh1o0E xmPJTIHngAHNNePX4oTz6HP+Gt0SCSL5GFoiue3pnwpthKJF5ioo7LQBY2zIH4GYyey4 POHg== X-Gm-Message-State: APjAAAWEJeTkB+92JHcA6b0MsLDu8hc1346PzuIPhb/gXR69Ns5jBklW ajQGa2Dr7soMRxF9ruQFHbWiB8mu8bU= X-Google-Smtp-Source: APXvYqzfofKlXbLqabuNmR9p7I6mkRM3vHAkDLbDEsiC/VdG54MdA+rlC/WoGl0bN/zo9F2u50WEIw== X-Received: by 2002:adf:dcce:: with SMTP id x14mr5682450wrm.315.1553524321389; Mon, 25 Mar 2019 07:32:01 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2019 14:31:51 +0000 Message-Id: <20190325143152.9981-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190325143152.9981-1-peter.maydell@linaro.org> References: <20190325143152.9981-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::433 Subject: [Qemu-devel] [PULL 5/6] target/arm: cortex-a7 and cortex-a15 have pmus 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: Andrew Jones cortex-a7 and cortex-a15 have pmus (PMUv2) and they advertise them in ID_DFR0. Let's allow them to function. This also enables the pmu cpu property to work with these cpu types, i.e. we can now do '-cpu cortex-a15,pmu=3Doff' to remove the pmu. Signed-off-by: Andrew Jones Reviewed-by: Richard Henderson Message-id: 20190322162333.17159-3-drjones@redhat.com Signed-off-by: Peter Maydell --- target/arm/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 96f0ff0ec72..504a4771fbd 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1109,6 +1109,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error= **errp) #endif } else { cpu->id_aa64dfr0 &=3D ~0xf00; + cpu->id_dfr0 &=3D ~(0xf << 24); cpu->pmceid0 =3D 0; cpu->pmceid1 =3D 0; } @@ -1744,6 +1745,7 @@ static void cortex_a7_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_CBAR_RO); set_feature(&cpu->env, ARM_FEATURE_EL2); set_feature(&cpu->env, ARM_FEATURE_EL3); + set_feature(&cpu->env, ARM_FEATURE_PMU); cpu->kvm_target =3D QEMU_KVM_ARM_TARGET_CORTEX_A7; cpu->midr =3D 0x410fc075; cpu->reset_fpsid =3D 0x41023075; @@ -1789,6 +1791,7 @@ static void cortex_a15_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_CBAR_RO); set_feature(&cpu->env, ARM_FEATURE_EL2); set_feature(&cpu->env, ARM_FEATURE_EL3); + set_feature(&cpu->env, ARM_FEATURE_PMU); cpu->kvm_target =3D QEMU_KVM_ARM_TARGET_CORTEX_A15; cpu->midr =3D 0x412fc0f1; cpu->reset_fpsid =3D 0x410430f0; --=20 2.20.1