From patchwork Fri Mar 28 16:09:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 27324 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2DB9020545 for ; Fri, 28 Mar 2014 16:10:36 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id ur14sf2596651igb.1 for ; Fri, 28 Mar 2014 09:10:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=mxPqOfcWm7k5BNEiYQaHfc8Fed1k9HD9scvgJXZJtbc=; b=Mrt1s/9fdbY7+Sf8PC86Hz7GAtQm2QcDyVRwdzhJ20C3ZAkzK7iPaJm7N6zuLC1smF OT9DNWVgHcscA/CDYqZ9bJAZtlG6qUMrxMAzTp/wZcvt3w93OArS64DbJ7hFmel3+wUh wbrpu3j2pTHgZBX2fwZCwfluH5+OSu5KATHYDCLL7lFz6CjYP6G7sLg3SeAMHeB5vJad 7tW1x4qTtnpHzRZmxjZua/1LFRerCCeYW4X5BTw6KnLzqS4ULkz2GnvYoKe5QRb5Vsfc zMpHWc+E/zLqPVw6WkO48QZVklnliGhVssDcp5HUna00cAmCOo83raZ9fAVHE0KasFsU CQWQ== X-Gm-Message-State: ALoCoQkz6zssblTheyteRKBAuXyX/U0M1tgyrnGW5CDbhf0QoFwxCYJDWFQXWTFo+sZi1MXCJMqH X-Received: by 10.182.51.200 with SMTP id m8mr3564486obo.16.1396023035598; Fri, 28 Mar 2014 09:10:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.11 with SMTP id w11ls1617226qgw.42.gmail; Fri, 28 Mar 2014 09:10:35 -0700 (PDT) X-Received: by 10.220.95.139 with SMTP id d11mr2307270vcn.21.1396023035523; Fri, 28 Mar 2014 09:10:35 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id uz9si1327659vcb.47.2014.03.28.09.10.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 09:10:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so6000071vcb.2 for ; Fri, 28 Mar 2014 09:10:35 -0700 (PDT) X-Received: by 10.58.38.166 with SMTP id h6mr2058181vek.22.1396023035442; Fri, 28 Mar 2014 09:10:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.12.8 with SMTP id v8csp20541vcv; Fri, 28 Mar 2014 09:10:34 -0700 (PDT) X-Received: by 10.152.4.201 with SMTP id m9mr5584lam.61.1396023030393; Fri, 28 Mar 2014 09:10:30 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id rl8si3627000lbb.203.2014.03.28.09.10.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 09:10:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WTZMP-0000bf-39; Fri, 28 Mar 2014 16:10:25 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Dirk Mueller , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Will Newton , Peter Crosthwaite Subject: [PATCH v5 11/37] target-arm: Don't mention PMU in debug feature register Date: Fri, 28 Mar 2014 16:09:58 +0000 Message-Id: <1396023024-2262-12-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1396023024-2262-1-git-send-email-peter.maydell@linaro.org> References: <1396023024-2262-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Suppress the ID_AA64DFR0_EL1 PMUVer field, even if the CPU specific value claims that it exists. QEMU doesn't currently implement it, and not advertising it prevents the guest from trying to use it and getting UNDEFs on unimplemented registers. Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite --- This is arguably a hack, but otherwise Linux tries to prod half a dozen PMU sysregs. --- target-arm/helper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 4b6c1b6..62f7fd3 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2036,7 +2036,12 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name = "ID_AA64DFR0_EL1", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 0, .access = PL1_R, .type = ARM_CP_CONST, - .resetvalue = cpu->id_aa64dfr0 }, + /* We mask out the PMUVer field, beacuse we don't currently + * implement the PMU. Not advertising it prevents the guest + * from trying to use it and getting UNDEFs on registers we + * don't implement. + */ + .resetvalue = cpu->id_aa64dfr0 & ~0xf00 }, { .name = "ID_AA64DFR1_EL1", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 1, .access = PL1_R, .type = ARM_CP_CONST,