From patchwork Mon Feb 16 14:50:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 44710 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 4F6B021544 for ; Mon, 16 Feb 2015 14:52:50 +0000 (UTC) Received: by labge10 with SMTP id ge10sf19767456lab.3 for ; Mon, 16 Feb 2015 06:52:49 -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=JLWiGHpn8HkGRwn4hOd4WtxAOMXlGeQAP8rO2YVTKf0=; b=jqo0vc62ZqjIWsyEgzGTEerhCqEDvGEkvjgrIDjXzPlB3GTVHGQ4b/9k1wHkbB7TOo YfNFFsRWbV9JHMZSbcUB/X5EpJU4322k/fceO1Tm8WM8ghof/pLvE2c+sjHEi1Hgfc7l FBPhI75HCjNsgPSA8HsxB9D+thovTK/5vsYygOwnhpAj0YADbD3vlK6dS4r76TLQlV73 Uk2v4rXxaQKTJ352997jAES+bQQSoLdnZULiffxdKTf28iNULCrupPcJjdztXvJ2gDr2 dUDxS1JS7jUia1j11qjFQGc1yvgOCPBmNtNrcn4fZlmlk/z3oWs0a6xDRxZofrQszzg1 IdPQ== X-Gm-Message-State: ALoCoQnY5YmryxV8xyjOrZPi7QfQmTHWfw7EAD5EmEulml51+xhIeMvHkcOrnD7/e6mfTf0C/u9H X-Received: by 10.181.29.66 with SMTP id ju2mr1959874wid.1.1424098369333; Mon, 16 Feb 2015 06:52:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.97 with SMTP id z1ls574888laz.35.gmail; Mon, 16 Feb 2015 06:52:48 -0800 (PST) X-Received: by 10.152.9.2 with SMTP id v2mr22481112laa.67.1424098368976; Mon, 16 Feb 2015 06:52:48 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id k3si8232272lbl.81.2015.02.16.06.52.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 06:52:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by labpv20 with SMTP id pv20so29042963lab.8 for ; Mon, 16 Feb 2015 06:52:48 -0800 (PST) X-Received: by 10.152.43.193 with SMTP id y1mr23421302lal.35.1424098368758; Mon, 16 Feb 2015 06:52:48 -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 h5csp1629452lbj; Mon, 16 Feb 2015 06:52:47 -0800 (PST) X-Received: by 10.52.178.170 with SMTP id cz10mr13281249vdc.1.1424098367164; Mon, 16 Feb 2015 06:52:47 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id ao14si7265623vdc.81.2015.02.16.06.52.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Feb 2015 06:52:47 -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 1YNN1Y-0001qh-Bj; Mon, 16 Feb 2015 14:51:48 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YNN1V-0001mF-Fd for xen-devel@lists.xenproject.org; Mon, 16 Feb 2015 14:51:46 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 47/EA-02804-00402E45; Mon, 16 Feb 2015 14:51:44 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-14.tower-206.messagelabs.com!1424098303!6790520!1 X-Originating-IP: [74.125.82.44] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31628 invoked from network); 16 Feb 2015 14:51:44 -0000 Received: from mail-wg0-f44.google.com (HELO mail-wg0-f44.google.com) (74.125.82.44) by server-14.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 16 Feb 2015 14:51:44 -0000 Received: by mail-wg0-f44.google.com with SMTP id k14so20014001wgh.3 for ; Mon, 16 Feb 2015 06:51:43 -0800 (PST) X-Received: by 10.180.91.79 with SMTP id cc15mr17556685wib.52.1424098303769; Mon, 16 Feb 2015 06:51:43 -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.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Feb 2015 06:51:42 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 16 Feb 2015 14:50:53 +0000 Message-Id: <1424098255-22490-14-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 13/15] xen/arm: vgic-v2: GICD_I{S, C}PENDR* are only word-accessible 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.42 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: Signed-off-by: Julien Grall Acked-by: Ian Campbell --- This patch is candidate for backporting to Xen 4.4 and Xen 4.5. Although, this patch won't apply directly to Xen 4.4. Changes in v3: - Add Ian's ack Changes in v2: - Patch added --- xen/arch/arm/vgic-v2.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c index e7cdf9e..1a02541 100644 --- a/xen/arch/arm/vgic-v2.c +++ b/xen/arch/arm/vgic-v2.c @@ -95,7 +95,7 @@ static int vgic_v2_distr_mmio_read(struct vcpu *v, mmio_info_t *info) return 1; case GICD_ISPENDR ... GICD_ISPENDRN: - if ( dabt.size != DABT_BYTE && dabt.size != DABT_WORD ) goto bad_width; + if ( dabt.size != DABT_WORD ) goto bad_width; rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ISPENDR, DABT_WORD); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank, flags); @@ -104,8 +104,8 @@ static int vgic_v2_distr_mmio_read(struct vcpu *v, mmio_info_t *info) return 1; case GICD_ICPENDR ... GICD_ICPENDRN: - if ( dabt.size != DABT_BYTE && dabt.size != DABT_WORD ) goto bad_width; - rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ICPENDR, DABT_WORD); + if ( dabt.size != DABT_WORD ) goto bad_width; + rank = vgic_rank_offset(v, 0, gicd_reg - GICD_ICPENDR, DABT_WORD); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank, flags); *r = vgic_byte_read(rank->ipend, dabt.sign, gicd_reg); @@ -331,17 +331,17 @@ static int vgic_v2_distr_mmio_write(struct vcpu *v, mmio_info_t *info) return 1; case GICD_ISPENDR ... GICD_ISPENDRN: - if ( dabt.size != DABT_BYTE && dabt.size != DABT_WORD ) goto bad_width; + if ( dabt.size != DABT_WORD ) goto bad_width; printk(XENLOG_G_ERR - "%pv: vGICD: unhandled %s write %#"PRIregister" to ISPENDR%d\n", - v, dabt.size ? "word" : "byte", *r, gicd_reg - GICD_ISPENDR); + "%pv: vGICD: unhandled word write %#"PRIregister" to ISPENDR%d\n", + v, *r, gicd_reg - GICD_ISPENDR); return 0; case GICD_ICPENDR ... GICD_ICPENDRN: - if ( dabt.size != DABT_BYTE && dabt.size != DABT_WORD ) goto bad_width; + if ( dabt.size != DABT_WORD ) goto bad_width; printk(XENLOG_G_ERR - "%pv: vGICD: unhandled %s write %#"PRIregister" to ICPENDR%d\n", - v, dabt.size ? "word" : "byte", *r, gicd_reg - GICD_ICPENDR); + "%pv: vGICD: unhandled word write %#"PRIregister" to ICPENDR%d\n", + v, *r, gicd_reg - GICD_ICPENDR); return 0; case GICD_ISACTIVER ... GICD_ISACTIVERN: