From patchwork Wed Jun 1 10:19:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9147077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5D5AD60757 for ; Wed, 1 Jun 2016 10:21:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4ECD91FF65 for ; Wed, 1 Jun 2016 10:21:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4359B26785; Wed, 1 Jun 2016 10:21:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E556E1FF65 for ; Wed, 1 Jun 2016 10:21:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b83FS-0000Xx-QR; Wed, 01 Jun 2016 10:19:38 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b83FS-0000Xr-BG for xen-devel@lists.xensource.com; Wed, 01 Jun 2016 10:19:38 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id 94/FD-30266-9B6BE475; Wed, 01 Jun 2016 10:19:37 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRWlGSWpSXmKPExsVybKJsh+7ObX7 hBhNX8Vvcm/Ke3YHRY3vfLvYAxijWzLyk/IoE1oxbM/ezF7RwVryd8Ja1gbGHvYuRk0NIYCqj xJ+Nwl2MXEB2O5NE27qXLF2MHBwsAloSbz/kgNSwCRhK/H2yiQ0kLAFkL/nMARIWEZCQ2NSwg gnEZhbwk3h7cz7YSGGBYIkHW5+zgNi8At4SLXf/gNmiAroSh/79YYOIC0qcnPmEBaJXS2L59G 1gtoRAhsS8njmsELaXxKIbl6BsNYmr5zYxT2Dkn4WkfRaS9gWMTKsY1YtTi8pSi3QN9ZKKMtM zSnITM3N0DQ3M9HJTi4sT01NzEpOK9ZLzczcxAgONAQh2MO587nSIUZKDSUmUd/sGv3AhvqT8 lMqMxOKM+KLSnNTiQ4waHBwCm9euvsAoxZKXn5eqJMErthWoTrAoNT21Ii0zBxgLMKUSHDxKI ryaW4DSvMUFibnFmekQqVOMilLivDdAEgIgiYzSPLg2WPxdYpSVEuZlBDpKiKcgtSg3swRV/h WjOAejkjCvBMh2nsy8Erjpr4AWMwEtjs/wAVlckoiQkmpgNGAVtH9hc2CesTrj1Ec5XCfitK3 3Zq384SXhOCut1GbBodbQNZo3YzkP8uv/ORoz84bM8k3FkntepOT4h0kt5Tz99HvsvSjb8s5j Dxj0zLUvfVd40TVv/xaX5fenzzEzs3P0VVOc8HvXtqC6z0t/lPe0nrHzCq5dl8FoovJCd1lRt Fy1zj5tJZbijERDLeai4kQAh+uRl7oCAAA= X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-2.tower-21.messagelabs.com!1464776375!2956618!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 40278 invoked from network); 1 Jun 2016 10:19:37 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-2.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 1 Jun 2016 10:19:37 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECB9C20437; Wed, 1 Jun 2016 10:19:31 +0000 (UTC) Received: from [10.0.0.5] (23.105.115.87.dyn.plus.net [87.115.105.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B0272041E; Wed, 1 Jun 2016 10:19:29 +0000 (UTC) Date: Wed, 1 Jun 2016 11:19:24 +0100 (BST) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: julien.grall@arm.com Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Cc: sstabellini@kernel.org, wei.liu2@citrix.com, xen-devel@lists.xensource.com Subject: [Xen-devel] [PATCH for-4.7] xen/arm: warn the user that we cannout route SPIs to Dom0 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP as a consequence of 9d77b3c01d1261ce17c10097a1b393f2893ca657 being reverted. Signed-off-by: Stefano Stabellini Acked-by: Julien Grall diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index ee35683..babc822 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include @@ -342,9 +344,15 @@ void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) unsigned long flags; int i = 0; struct vcpu *v_target; + struct domain *d = v->domain; while ( (i = find_next_bit(&mask, 32, i)) < 32 ) { irq = i + (32 * n); + /* Set the irq type and route it to guest only for SPI and Dom0 */ + if( irq_access_permitted(d, irq) && is_hardware_domain(d) && + ( irq >= 32 ) && ( !acpi_disabled ) ) + gprintk(XENLOG_WARNING, "Routing SPIs to Dom0 on ACPI systems is unimplemented.\n"); + v_target = __vgic_get_target_vcpu(v, irq); p = irq_to_pending(v_target, irq); set_bit(GIC_IRQ_GUEST_ENABLED, &p->status);