From patchwork Wed Jan 6 17:21:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 7968921 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C02959F32E for ; Wed, 6 Jan 2016 17:25:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02645200E0 for ; Wed, 6 Jan 2016 17:25:00 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27B20200DE for ; Wed, 6 Jan 2016 17:24:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aGrn3-0007iT-6G; Wed, 06 Jan 2016 17:22:29 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aGrn1-0007hx-0Z for xen-devel@lists.xensource.com; Wed, 06 Jan 2016 17:22:27 +0000 Received: from [193.109.254.147] by server-4.bemta-14.messagelabs.com id 8F/4F-10715-25D4D865; Wed, 06 Jan 2016 17:22:26 +0000 X-Env-Sender: prvs=8066dafa4=Stefano.Stabellini@citrix.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1452100942!15043976!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 64778 invoked from network); 6 Jan 2016 17:22:23 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-16.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 6 Jan 2016 17:22:23 -0000 X-IronPort-AV: E=Sophos;i="5.20,530,1444694400"; d="scan'208";a="329391834" Date: Wed, 6 Jan 2016 17:21:25 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 Cc: Julien Grall , Ian Campbell , Stefano Stabellini Subject: [Xen-devel] [PATCH v3] xen/arm: ignore writes to GICD_ICACTIVER ... GICD_ICACTIVERN X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Injecting a fault to the guest just because it is writing to one of the GICD_ICACTIVER registers, which are part of the GICv2 and GICv3 specs, is harsh. Additionally it causes recent linux kernels to fail to boot on Xen. Ignore writes to GICD_ICACTIVER ... GICD_ICACTIVERN instead, to solve the boot issue and for backportability. However implementing the registers properly might a better long term solution. Signed-off-by: Stefano Stabellini --- Changes in v3: - do not turn printk into gdprintk Changes in v2: - rebase on staging diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c index 2c73133..a0cab5b 100644 --- a/xen/arch/arm/vgic-v2.c +++ b/xen/arch/arm/vgic-v2.c @@ -494,11 +494,10 @@ static int vgic_v2_distr_mmio_write(struct vcpu *v, mmio_info_t *info, return 0; case VRANGE32(GICD_ICACTIVER, GICD_ICACTIVERN): - if ( dabt.size != DABT_WORD ) goto bad_width; printk(XENLOG_G_ERR "%pv: vGICD: unhandled word write %#"PRIregister" to ICACTIVER%d\n", v, r, gicd_reg - GICD_ICACTIVER); - return 0; + goto write_ignore_32; case VRANGE32(GICD_IPRIORITYR, GICD_IPRIORITYRN): { diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index 985e866..b43fa88 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -621,11 +621,10 @@ static int __vgic_v3_distr_common_mmio_write(const char *name, struct vcpu *v, return 0; case VRANGE32(GICD_ICACTIVER, GICD_ICACTIVERN): - if ( dabt.size != DABT_WORD ) goto bad_width; printk(XENLOG_G_ERR "%pv: %s: unhandled word write %#"PRIregister" to ICACTIVER%d\n", v, name, r, reg - GICD_ICACTIVER); - return 0; + goto write_ignore_32; case VRANGE32(GICD_IPRIORITYR, GICD_IPRIORITYRN): {