From patchwork Fri Apr 24 15:19:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 47568 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0255720553 for ; Fri, 24 Apr 2015 15:23:42 +0000 (UTC) Received: by wghm4 with SMTP id m4sf12583550wgh.2 for ; Fri, 24 Apr 2015 08:23:42 -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:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=Lj98C8YMoh1+hW3Y4gZ4KwCvvP7O9EmVOI4sLROD3vA=; b=izEZvIo+hyDe614dIexUIo/FSkwHOJ9EFtquDOu14fU3/Uq/CUbIYN7hK88EhULBGw wxouNC6nbXjlwDiSF42v8YwhOqQFlFrzZE1GDb3BgPZRIyb/DZz4LSQBZnDcCqehjZBK MKe+asBlNpIQXnfDYlIXN8abFxM8e07efnMdqlxROSBa7rBqes0UHVHqSM9EnRlW6n3K Yq757i396bYCOg4kfh1MJxjmeACLR8c8zjqfhXTLMELqr/ynejbtHnqpVMIWiuaedYCl +d/OZZRBXNS7dOtyOdaQDd95Y7WELt6rFFBNDqmVE4Q/obkCC5LnhdUvti2YEaTBkzs2 jYnA== X-Gm-Message-State: ALoCoQn0xal4EfzdNCs/hh63Fhsu+isY5XVNSFtqhf0gbD9lJJdFS+6q6IackgX6FkC8jMYx5ff0 X-Received: by 10.112.53.102 with SMTP id a6mr4529415lbp.16.1429889022263; Fri, 24 Apr 2015 08:23:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.70 with SMTP id le6ls521537lac.50.gmail; Fri, 24 Apr 2015 08:23:42 -0700 (PDT) X-Received: by 10.112.159.9 with SMTP id wy9mr7186867lbb.120.1429889022052; Fri, 24 Apr 2015 08:23:42 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id x5si7914838laj.129.2015.04.24.08.23.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2015 08:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by layy10 with SMTP id y10so37870394lay.0 for ; Fri, 24 Apr 2015 08:23:41 -0700 (PDT) X-Received: by 10.112.204.6 with SMTP id ku6mr7262168lbc.73.1429889021613; Fri, 24 Apr 2015 08:23:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp1259820lbt; Fri, 24 Apr 2015 08:23:41 -0700 (PDT) X-Received: by 10.140.21.168 with SMTP id 37mr9698461qgl.7.1429889020482; Fri, 24 Apr 2015 08:23:40 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id q63si11674025qgd.39.2015.04.24.08.23.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 24 Apr 2015 08:23:40 -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; Received: from localhost ([::1]:45326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlfS7-0001Kz-LV for patch@linaro.org; Fri, 24 Apr 2015 11:23:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlfOq-0004Cs-Js for qemu-devel@nongnu.org; Fri, 24 Apr 2015 11:20:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlfOk-0004c2-Dw for qemu-devel@nongnu.org; Fri, 24 Apr 2015 11:20:16 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:33035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlfOk-0004bX-AS for qemu-devel@nongnu.org; Fri, 24 Apr 2015 11:20:10 -0400 Received: by oblw8 with SMTP id w8so40173266obl.0 for ; Fri, 24 Apr 2015 08:20:09 -0700 (PDT) X-Received: by 10.60.52.237 with SMTP id w13mr7816130oeo.58.1429888808976; Fri, 24 Apr 2015 08:20:08 -0700 (PDT) Received: from gbellows-linaro.gateway.pace.com (99-179-1-214.lightspeed.austtx.sbcglobal.net. [99.179.1.214]) by mx.google.com with ESMTPSA id e203sm6659430oic.29.2015.04.24.08.20.06 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Apr 2015 08:20:07 -0700 (PDT) From: Greg Bellows To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 24 Apr 2015 10:19:57 -0500 Message-Id: <1429888797-4378-1-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.214.175 Cc: Greg Bellows Subject: [Qemu-devel] [PATCH] Allow ARMv8 SCR.SMD updates X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: greg.bellows@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Updated scr_write to always allow updates to the SCR.SMD bit on ARMv8 regardless of whether virtualization (EL2) is enabled or not. Signed-off-by: Greg Bellows --- target-arm/helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index e7ab5c4..2a8bd87 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -844,8 +844,10 @@ static void scr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) * supported if EL2 exists. The bit is UNK/SBZP when * EL2 is unavailable. In QEMU ARMv7, we force it to always zero * when EL2 is unavailable. + * On ARMv8, this bit is always available. */ - if (arm_feature(env, ARM_FEATURE_V7)) { + if (arm_feature(env, ARM_FEATURE_V7) && + !arm_feature(env, ARM_FEATURE_V8)) { valid_mask &= ~SCR_SMD; } }