From patchwork Sat Sep 23 00:41:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9967333 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 D3692602CB for ; Sat, 23 Sep 2017 00:44:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5A10299C9 for ; Sat, 23 Sep 2017 00:44:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9FEA299CD; Sat, 23 Sep 2017 00:44:33 +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,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4984C299C9 for ; Sat, 23 Sep 2017 00:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=7I06MeglcjfnfGcwoTPeRxUHstw76CTL5K4cyC/U214=; b=f7j/Kr0277zUj8cFQuezjHsGEw q86CTmm6cZ3TA6N7atrpuqpA4iNz1Ku09zqMmMfH9Mvc6h5E4wlPpVXmdZnLG0OVHw48OaOCDfDAH JwCQSqOvZk3XKkCKDrOU36eS9Yd+iVkN9oawrcUasjZra+gSmPxNEhG5s8aBePZ459PGIx8z/aTbs bKz8hoxPDMoqBWDZcQezVh7GM5gD/McQN+Wopu43RRtkilYmETzf1FeWkoDETqgwZVZQ8jak5hruI sFdUT1hiUo6m3imqlcAkh4jZVGXlEBNcw1f6UIf5jGzSlnwEwgTltMo2ebOy8ycpfu9EzjVWAk8PX KGBCT4nA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dvYYW-00051z-8n; Sat, 23 Sep 2017 00:44:28 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dvYWk-0003lh-4C for linux-arm-kernel@lists.infradead.org; Sat, 23 Sep 2017 00:42:42 +0000 Received: by mail-wm0-x233.google.com with SMTP id r136so7639488wmf.2 for ; Fri, 22 Sep 2017 17:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TA9mvvO9O1Gqvl5Y91Mcl0CiT+r4G+0YSNPZK0jsioM=; b=CMxcVgA0ld6DdwQsjldBWtBDWLxop/tt3EzxmMRr+hyjKdGfyEeKmvH77d3tYHsFlw z2fZrbhmhJkP539+Mul612UV6ejwtfiGNelwnPUINBo3dV3wSVGAcWjtVh2MeNIJutYi OmEWZyWE8D30od6TssY7lr84zT8+bjDsIOSZY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TA9mvvO9O1Gqvl5Y91Mcl0CiT+r4G+0YSNPZK0jsioM=; b=Xf0YYtqs94OrxfQG9RjslkukDuyiGr4HieicNSwTI8arQKZICyb9VglBwLxYQ5bxat DZYFJPOSiEQ5V6zcm+s0l5iCF7VtOEDlv/FBVfsAG79T3TdY/7rgpujMD14DHWwW21HA rwC3CxL50Ag3inI7hT6oxDtm9O0cLh2sttiLq92geWCOZS17FVap6u15SOZ9/5+0FckR i01OZDHU3QySQaqpHA5IDKsOS+c5wUrZPbTxvEQ7DzYOM58lJ3KnD9cOfSU7UpmHUmi7 VsbS/OxZLUq+rTCsjGl6jm+1rY0IneIQU1ydwuulPRJG56n/Wwi8XiPLnCaP/7UObwsZ 5eug== X-Gm-Message-State: AHPjjUiSyLuYCFA4FWR67BwrMVRbCKoDbAZedvkicpfHvTfHcFNwZPqx nU6hckgAkwxImAZ2rNTM7l0XZg== X-Google-Smtp-Source: AOwi7QAnjgNz8B1pUWIh+pOoLILMSNzxS1wvP69gseC3wK1RK15OjM3slX5+1bbsbb5JFIKeEGCIeg== X-Received: by 10.80.195.10 with SMTP id a10mr6469296edb.276.1506127333116; Fri, 22 Sep 2017 17:42:13 -0700 (PDT) Received: from localhost.localdomain (xd93dd96b.cust.hiper.dk. [217.61.217.107]) by smtp.gmail.com with ESMTPSA id c25sm646085edb.57.2017.09.22.17.42.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 17:42:11 -0700 (PDT) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 06/20] KVM: arm/arm64: Check that system supports split eoi/deactivate Date: Sat, 23 Sep 2017 02:41:53 +0200 Message-Id: <20170923004207.22356-7-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170923004207.22356-1-cdall@linaro.org> References: <20170923004207.22356-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170922_174238_756354_9D4080BE X-CRM114-Status: GOOD ( 12.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Catalin Marinas , Will Deacon , kvm@vger.kernel.org, Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Some systems without proper firmware and/or hardware description data don't support the split EOI and deactivate operation. On such systems, we cannot leave the physical interrupt active after the timer handler on the host has run, so we cannot support KVM with an in-kernel GIC with the timer changes we are about to introduce. This patch makes sure that trying to initialize the KVM GIC code will fail on such systems. Cc: Marc Zyngier Signed-off-by: Christoffer Dall --- drivers/irqchip/irq-gic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index f641e8e..ab12bf4 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -1420,7 +1420,8 @@ static void __init gic_of_setup_kvm_info(struct device_node *node) if (ret) return; - gic_set_kvm_info(&gic_v2_kvm_info); + if (static_key_true(&supports_deactivate)) + gic_set_kvm_info(&gic_v2_kvm_info); } int __init