From patchwork Mon Feb 16 14:50:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 44715 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B201921544 for ; Mon, 16 Feb 2015 14:53:25 +0000 (UTC) Received: by lamq1 with SMTP id q1sf19908127lam.0 for ; Mon, 16 Feb 2015 06:53:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=Xrz4Xp0txJA50ifMwJf8qR7Y/iBLeh5lo199mtrLUPM=; b=m4TDrBTk9Zp3UKJMKLVbVOB8wPvsqJ1jMgoeccILUSCDSt0SJTljWiE54MCaZsXHm1 taYOPRvq8+nimWqxvwHu6Bu2HGAfzz+GssNtC2oZ9NCJf1HPSyEZdonVHP9J+ZHWQsJp vbYGzIqDrbsZ0sRabGOcvVhPoLAycJCIMzo5zAh1WV8eAI1sD9UDdi2Geju8VA/+rPGw QvPI7+mhDcAynagNmU/bKjfNkocmvlKV8Qci3BPCNKM9iFOuHjOi0dMfksgcz5SHlIGq E7vZxu9ewRL5LS4Y8iua4yO6kuj4+Yit1JcXlUtEOHzKQ2R7gjw6EJnAFNK2WBpDK/nh /2xA== X-Gm-Message-State: ALoCoQkZ7onABah3sASDpZ8EvEmY0deU9wU9i31AEQdLTZSFDZjt/67Dojpvs9rr+qn5bXXZeA7Z X-Received: by 10.112.144.130 with SMTP id sm2mr2777079lbb.9.1424098404614; Mon, 16 Feb 2015 06:53:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.70 with SMTP id be6ls576342lab.41.gmail; Mon, 16 Feb 2015 06:53:24 -0800 (PST) X-Received: by 10.112.12.196 with SMTP id a4mr23191793lbc.8.1424098404474; Mon, 16 Feb 2015 06:53:24 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id s1si9809760laj.86.2015.02.16.06.53.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 06:53:24 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labms9 with SMTP id ms9so23337765lab.10 for ; Mon, 16 Feb 2015 06:53:24 -0800 (PST) X-Received: by 10.152.87.3 with SMTP id t3mr21358791laz.19.1424098404383; Mon, 16 Feb 2015 06:53:24 -0800 (PST) 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.35.133 with SMTP id h5csp1629778lbj; Mon, 16 Feb 2015 06:53:23 -0800 (PST) X-Received: by 10.180.106.103 with SMTP id gt7mr5281569wib.59.1424098403604; Mon, 16 Feb 2015 06:53:23 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id lx9si22612657wjb.182.2015.02.16.06.53.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Feb 2015 06:53:23 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YNN1L-0001Zy-CU; Mon, 16 Feb 2015 14:51:35 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YNN1J-0001U8-Rt for xen-devel@lists.xenproject.org; Mon, 16 Feb 2015 14:51:33 +0000 Received: from [193.109.254.147] by server-2.bemta-14.messagelabs.com id C7/29-31919-5F302E45; Mon, 16 Feb 2015 14:51:33 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-12.tower-27.messagelabs.com!1424098292!13773157!1 X-Originating-IP: [74.125.82.52] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17951 invoked from network); 16 Feb 2015 14:51:32 -0000 Received: from mail-wg0-f52.google.com (HELO mail-wg0-f52.google.com) (74.125.82.52) by server-12.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 16 Feb 2015 14:51:32 -0000 Received: by mail-wg0-f52.google.com with SMTP id x12so19937544wgg.11 for ; Mon, 16 Feb 2015 06:51:32 -0800 (PST) X-Received: by 10.194.142.205 with SMTP id ry13mr52332574wjb.73.1424098291999; Mon, 16 Feb 2015 06:51:31 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id dj5sm23172398wjb.28.2015.02.16.06.51.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Feb 2015 06:51:31 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 16 Feb 2015 14:50:45 +0000 Message-Id: <1424098255-22490-6-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1424098255-22490-1-git-send-email-julien.grall@linaro.org> References: <1424098255-22490-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Vijaya.Kumar@caviumnetworks.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH v3 05/15] xen/arm: vgic-v3: Correctly implement read into GICR_NSACR X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@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.54 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 List-Archive: The 32-bit register GICR_NSACR is RAZ/WI on non-secure state. Therefore we should not inject a data abort to the guest. Signed-off-by: Julien Grall Acked-by: Ian Campbell --- This patch should be backport to Xen 4.5. The current implementation will inject a data abort into the guest. Changes in v3: - Add Ian's ack Changes in v2: - Patch added --- xen/arch/arm/vgic-v3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index 1145972..2c14717 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -530,8 +530,9 @@ static int vgic_v3_rdistr_sgi_mmio_read(struct vcpu *v, mmio_info_t *info, vgic_unlock_rank(v, rank, flags); return 1; case GICR_NSACR: - if ( dabt.size != DABT_WORD ) goto bad_width; - return 1; + /* We do not implement security extensions for guests, read zero */ + goto read_as_zero_32; + default: printk(XENLOG_G_ERR "%pv: vGICR: SGI: read r%d offset %#08x\n not found",