From patchwork Thu Jan 29 18:25:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 43963 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9516224134 for ; Thu, 29 Jan 2015 18:28:15 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id f15sf1773286lbj.2 for ; Thu, 29 Jan 2015 10:28:14 -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=yWLKPZ1XuONxNjkPSBdgKtx1YaM6e7FosSAydqy+/Fs=; b=PyhditD08/jW+xzM6lGWDzG1f1patMgaqzkkYmPFIx8yGFyNN/J3uoF/ts2oNPj0SF mX4H6rEd5divmPIn07d8jyWjRhmbyVeLNJtzO1jSVTcMr6oz5sx/pUQkqZQ2IapzkJFK p8w5Iy1UKfaYjtP1eq47aql4r6KTU361c5DSRwUVDrvzdJGrcNGOimNcmEKX3ejREJxi 3XlTTvFE9fBvv9ys0evE1RGxhP7GWDJbvOJ4vSa+gTUA5+aqi9/WxGnskntC4EJskAYC i2qXtQ2vyy5E0PMWnLCP2ZcxQblZ/K8Uia/CFBaPR+y4tE4Zvg0cJfM91EainvhgaRh/ CiOQ== X-Gm-Message-State: ALoCoQkZz5AGOgFGM6XFr2TmLs+1UREIQRUnMDKApG9KBU811pIaxyrxHvI5xejFKCpJTd7OZNP/ X-Received: by 10.112.161.201 with SMTP id xu9mr306587lbb.11.1422556094528; Thu, 29 Jan 2015 10:28:14 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.37 with SMTP id ll5ls368130lac.53.gmail; Thu, 29 Jan 2015 10:28:14 -0800 (PST) X-Received: by 10.152.180.35 with SMTP id dl3mr2654020lac.24.1422556094308; Thu, 29 Jan 2015 10:28:14 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id t1si8166202lag.91.2015.01.29.10.28.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 10:28:14 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id l4so31294309lbv.3 for ; Thu, 29 Jan 2015 10:28:14 -0800 (PST) X-Received: by 10.112.125.41 with SMTP id mn9mr2554049lbb.80.1422556089442; Thu, 29 Jan 2015 10:28:09 -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 h5csp34213lbj; Thu, 29 Jan 2015 10:28:08 -0800 (PST) X-Received: by 10.180.8.233 with SMTP id u9mr2638780wia.56.1422556081993; Thu, 29 Jan 2015 10:28:01 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id cv8si16244856wjc.78.2015.01.29.10.28.01 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 10:28:01 -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 1YGtnm-0004dm-Mr; Thu, 29 Jan 2015 18:26:50 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YGtnj-0004cf-Ja for xen-devel@lists.xenproject.org; Thu, 29 Jan 2015 18:26:47 +0000 Received: from [85.158.139.211] by server-11.bemta-5.messagelabs.com id 47/6A-02757-66B7AC45; Thu, 29 Jan 2015 18:26:46 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-16.tower-206.messagelabs.com!1422556003!8298046!1 X-Originating-IP: [209.85.212.173] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17982 invoked from network); 29 Jan 2015 18:26:44 -0000 Received: from mail-wi0-f173.google.com (HELO mail-wi0-f173.google.com) (209.85.212.173) by server-16.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 29 Jan 2015 18:26:44 -0000 Received: by mail-wi0-f173.google.com with SMTP id r20so30237663wiv.0 for ; Thu, 29 Jan 2015 10:26:43 -0800 (PST) X-Received: by 10.194.234.40 with SMTP id ub8mr4005350wjc.100.1422556003389; Thu, 29 Jan 2015 10:26:43 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id x18sm3518503wia.12.2015.01.29.10.26.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 10:26:42 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 29 Jan 2015 18:25:40 +0000 Message-Id: <1422555950-31821-6-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1422555950-31821-1-git-send-email-julien.grall@linaro.org> References: <1422555950-31821-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 v2 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.217.172 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 --- This patch should be backport to Xen 4.5. The current implementation will inject a data abort into the guest. 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",