From nobody Sat May 4 23:01:30 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580501495762895.3102064298481; Fri, 31 Jan 2020 12:11:35 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ixccx-0001pa-Ux; Fri, 31 Jan 2020 20:10:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ixccx-0001pV-3D for xen-devel@lists.xenproject.org; Fri, 31 Jan 2020 20:10:55 +0000 Received: from webmail.dornerworks.com (unknown [12.207.209.150]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id c812b78c-4465-11ea-b211-bc764e2007e4; Fri, 31 Jan 2020 20:10:54 +0000 (UTC) X-Inumbo-ID: c812b78c-4465-11ea-b211-bc764e2007e4 From: Jeff Kubascik To: Date: Fri, 31 Jan 2020 15:10:46 -0500 Message-ID: <20200131201046.44996-1-jeff.kubascik@dornerworks.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [172.27.13.179] X-ClientProxiedBy: Mcbain.dw.local (172.27.1.45) To Mcbain.dw.local (172.27.1.45) X-spam-status: No, score=-2.9 required=3.5 tests=ALL_TRUSTED, BAYES_00, MAILSHELL_SCORE_10_69 X-Spam-Flag: NO Subject: [Xen-devel] [PATCH v2] xen/arm: Handle unimplemented VGICv3 dist registers as RAZ/WI X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk , Stefano Stabellini , Julien Grall Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Per the ARM Generic Interrupt Controller Architecture Specification (ARM IHI 0069E), reserved registers should generally be treated as RAZ/WI. To simplify the VGICv3 design and improve guest compatability, treat the default case for GICD registers as read_as_zero/write_ignore. Signed-off-by: Jeff Kubascik --- xen/arch/arm/vgic-v3.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index 422b94f902..8d0856ac33 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -1250,9 +1250,9 @@ static int vgic_v3_distr_mmio_read(struct vcpu *v, mm= io_info_t *info, goto read_impl_defined; =20 default: - printk(XENLOG_G_ERR "%pv: vGICD: unhandled read r%d offset %#08x\n= ", - v, dabt.reg, gicd_reg); - return 0; + /* Since reserved registers should be read-as-zero, make this the + * default case */ + goto read_as_zero; } =20 bad_width: @@ -1435,10 +1435,9 @@ static int vgic_v3_distr_mmio_write(struct vcpu *v, = mmio_info_t *info, goto write_impl_defined; =20 default: - printk(XENLOG_G_ERR - "%pv: vGICD: unhandled write r%d=3D%"PRIregister" offset %#= 08x\n", - v, dabt.reg, r, gicd_reg); - return 0; + /* Since reserved registers should be write-ignore, make this the + * default case */ + goto write_ignore; } =20 bad_width: --=20 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel