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: 9967321 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 0734D602CB for ; Sat, 23 Sep 2017 00:42:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE2B7299C9 for ; Sat, 23 Sep 2017 00:42:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E20BA299CD; Sat, 23 Sep 2017 00:42:52 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FABD299C9 for ; Sat, 23 Sep 2017 00:42:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbdIWAmS (ORCPT ); Fri, 22 Sep 2017 20:42:18 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:46512 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503AbdIWAmO (ORCPT ); Fri, 22 Sep 2017 20:42:14 -0400 Received: by mail-wm0-f46.google.com with SMTP id m72so7631403wmc.1 for ; Fri, 22 Sep 2017 17:42:13 -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=sKO7W0kI3t+miPCW5k7+cxuCSjDgmPMS5SEnl5n13rf3OYVhsjq7UIwhZsG8YQX8hg YHLCRpBggan351T9a/r3QFnNPMmiCOVpbpKVLkX2sFSLPrMeoh8dFDYonoilc2i10pcm o+RQn1f1f4SyzoOk1DpzpKvxviXeOgYqcTZXNe3i7IDnrECh2s5h7NO1rZDMqOrLCG+8 kHt6mO7vPQEjA4/9LrCo/14m7F/xawrKF/CZQqbnfYL6uqEzUGQpAwo2iMvVM+zTjGu6 ox64rZDKd37y13hpAsFjkoanH4x3HyQRiV+rhYR401UCP9cC6g2p+KwmdVlz9VjO2+By XX0A== X-Gm-Message-State: AHPjjUhWu0C9/qB8cnugfHnlFTb8kSYlP63Voc/0Z9ZezohRuLxRgElC u8GF2CU8GA32Y9JVwMznLqSxGOBfMD4= 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 Cc: kvm@vger.kernel.org, Marc Zyngier , Will Deacon , Catalin Marinas , Christoffer Dall 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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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