From patchwork Tue Sep 21 22:22:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 12509007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEFB9C433EF for ; Tue, 21 Sep 2021 22:25:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9668D61107 for ; Tue, 21 Sep 2021 22:25:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9668D61107 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References :Mime-Version:Message-Id:In-Reply-To:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zj7eAN7VKTHgPsfMPWHb034MH50gxcGOjNYBciga6eU=; b=QMrqT+6ZpC3IhQ ql9r1FUp0l+K+EWu6YoGJuO6qeCG3EsuYv3LNl+Czbhyo9/sHhbgENcNdz9hj8KqD0LN8+eRuZqkb 0+bICcyO/wVYevPpZY7TCsjLofeQbZ3jYI5k60JyrB/Q91A1ezHz61o97OSItABEVij/m+XcfgQxn 0gwWzp8exfMaTG/d2CiS+KDpJS4jl85oEUvGjNbK2c9IlhNU0cyTeKb6NHU9upXg4KCd82BtXNNZl 4KYUEa+zTDXaDYXaVlLkpo9kUAJdRAAe4F+6BctlId2mOI5T4IBUc1KYI28XH4ecE/7WFMUnlWYAN j4zCpN9GyEeQmDde4AsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSoAA-0069jj-SJ; Tue, 21 Sep 2021 22:22:55 +0000 Received: from mail-qv1-xf49.google.com ([2607:f8b0:4864:20::f49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSo9y-0069hm-Ix for linux-arm-kernel@lists.infradead.org; Tue, 21 Sep 2021 22:22:43 +0000 Received: by mail-qv1-xf49.google.com with SMTP id z6-20020a056214060600b0037a3f6bd9abso7176054qvw.3 for ; Tue, 21 Sep 2021 15:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=SaTJOdYvXhQ8G/3tAOF5ENdnH5rnLN1tbst38ysy7nQ=; b=Itjz4JdPW3Xd6IJyxU+IgSdqBKiKWfONk5ZYvUFx1Qp7H03KTwkiFwOIHlfFvMXymt YwweDiNKHXnGRYXCFukOUTERGOQ/qEruVBMYQRHI7PdZqNHSw8roU14gT9Kor+4fUTT4 TTZKHbsC3Qkywfp5SCnj6IAQonOjcdNizsj/2lnJCojdfgzHIZe5Squv9OS4bmW1W+A7 ADEEyakQ4kMkMzhUJM+WDyEfP8Kmp6FAQWbK9AmNVrkP5//1yJS+vUOZz2gsLOeT5nFJ 0uqiBfx8llKig/ymLOcBXfsc23k8km433C5Chi4dZ6WXvU1abTWhpdJAHraPS0n/IdU/ ygWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=SaTJOdYvXhQ8G/3tAOF5ENdnH5rnLN1tbst38ysy7nQ=; b=K+PYYqdniG2DWVpF7ttVJM3AEQgMiUCXNdtxEp4DIyiQRU9dCL8HeMTYJLnvFRigiv xjx//dcgCb2aWDpRGurqw+DDBKM2G41Lofj7EPnWhYgP/ILebJkzYwWRLvDMvCcCRfwg EpewwoF66IRyOHiEKTawLbv+0YRZHTHNDQbZBb8U9HqCFnm9JH9VgyfKUSrdu7YRh1QQ 4QQbitcaWE6CzwxUwoq+61k3EfSA+WLa3yLFJ++Umek8WHAHzFO5yzPIJVbay768T45T g7f0BtkEFk1k4gKuHhTfJX0ZQ4Zkky1I7nV8AOxrxAORSyApakaN6dUixQkHLgo67Qty RIYQ== X-Gm-Message-State: AOAM532BIR1ez1Y5ZXE/8hQB97NtPPMXnSBlK9igQAWUp++IvkjGwX+Y vD9fDbSZgW4b9lodTv0+mFDO0Rq5qws= X-Google-Smtp-Source: ABdhPJyo44HrE4gOW7Ep84hk/WccjZLkWsXMwCnXGAAXHM3jyvouSWGzVSAWQqO9FfsVmAnvX6n2wTzz5ww= X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:90:200:b022:92d6:d37b:686c]) (user=seanjc job=sendgmr) by 2002:a05:6902:124f:: with SMTP id t15mr42649007ybu.161.1632262960332; Tue, 21 Sep 2021 15:22:40 -0700 (PDT) Date: Tue, 21 Sep 2021 15:22:30 -0700 In-Reply-To: <20210921222231.518092-1-seanjc@google.com> Message-Id: <20210921222231.518092-2-seanjc@google.com> Mime-Version: 1.0 References: <20210921222231.518092-1-seanjc@google.com> X-Mailer: git-send-email 2.33.0.464.g1972c5931b-goog Subject: [PATCH 1/2] KVM: arm64: Unconditionally include generic KVM's Kconfig From: Sean Christopherson To: Catalin Marinas , Will Deacon , Marc Zyngier Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Sean Christopherson X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210921_152242_668317_35C15BD4 X-CRM114-Status: GOOD ( 10.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Sean Christopherson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Unconditionally "source" the generic KVM Kconfig instead of wrapping it with KVM=y. A future patch will select HAVE_KVM so that referencing HAVE_KVM in common kernel code doesn't break, and because KVM=y and HAVE_KVM=n is weird. Source the generic KVM Kconfig unconditionally so that HAVE_KVM and KVM don't end up with a circular dependency. Note, all but one of generic KVM's "configs" are of the HAVE_XYZ nature, and the one outlier correctly takes a dependency on CONFIG_KVM, i.e. the generic Kconfig is intended to be included unconditionally. No functional change intended. Signed-off-by: Sean Christopherson --- arch/arm64/kvm/Kconfig | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig index a4eba0908bfa..c50f75cf76fe 100644 --- a/arch/arm64/kvm/Kconfig +++ b/arch/arm64/kvm/Kconfig @@ -4,6 +4,7 @@ # source "virt/lib/Kconfig" +source "virt/kvm/Kconfig" menuconfig VIRTUALIZATION bool "Virtualization" @@ -42,10 +43,4 @@ menuconfig KVM If unsure, say N. -if KVM - -source "virt/kvm/Kconfig" - -endif # KVM - endif # VIRTUALIZATION From patchwork Tue Sep 21 22:22:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 12509009 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C1DAC433EF for ; Tue, 21 Sep 2021 22:25:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D87A261107 for ; Tue, 21 Sep 2021 22:25:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D87A261107 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References :Mime-Version:Message-Id:In-Reply-To:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sM81i2B9g9OAKUX3lLaRrelzTyRtMZYPdBwSqDTjejc=; b=kQuw02qhXJEjaR pLiDNv5L//8hJXgv54052tTFA9KE8OJ+jVc14229z9RGmb6JTG2y64zWyELSB7Z3diYaUjU8xJYn4 XbyEr7aOuA856Ma6837GX4sGmoJVDBqfYWUYiu1/1s4b0gU19ZICvNKNgWGY4MziKIQPI5Su5Af3I zYF6UTUKQ9wBv/gv6z2xbntEQGBfjG8Ph2zdVwB7Z0jz8QMm/f7b28LeZbO+YYYXRAtbtsWCCdZMZ 6tmAruD6IfPYFw/kw5i1o41IMdMswUzUbG0Gwid5XS4+rGdlQiho8vuanFdD3flERzi7BiTwgTZfw 76fOiYu8hSNfFiaGcu0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSoAK-0069kB-Km; Tue, 21 Sep 2021 22:23:04 +0000 Received: from mail-qt1-x84a.google.com ([2607:f8b0:4864:20::84a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSo9z-0069i9-T2 for linux-arm-kernel@lists.infradead.org; Tue, 21 Sep 2021 22:22:45 +0000 Received: by mail-qt1-x84a.google.com with SMTP id d20-20020ac81194000000b002a53ffbd04dso4046172qtj.12 for ; Tue, 21 Sep 2021 15:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=fe6asXWFzX1XFZzq1x4wsBW8hMTSeHYjNsqHVsCHq7g=; b=eV+o7MHP7TJ1wHQqCm2Wyy5n+IVG3LKtSt+UgnoNnssmXw3fD0cefPXnelgq+GjVjr 9g2hKWvcT6KUhIKypS3wC+X2NLUqbxUgLQR19KNtifP2rjqKyR6MXfYtUCH5/7QswDxf FOyLvSgu1SgP/xkZYIUffAaQ7zeFu85jIXz8vchCoJu5QIuscL4HPLnEqgX34hHtDWMA xrTIHe/h9QmhXMbrbQkNoklcocbevjzN6q0aDxhtulnOO9ApjUqn+pRM44+YdHHEb1ee 2L4nQWKAeliciloIFeM553LJHMQvjZTnA/Q+IJHnh5eAVzCDELMxtKFLAZLw7x5OUTOp u/vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=fe6asXWFzX1XFZzq1x4wsBW8hMTSeHYjNsqHVsCHq7g=; b=EOkVUoH63OqAZvis9jzi2X5E+d/Enf+E3757kaRvX95KzT0kJKSKUoIab8/2XCpRoE K4j8ORS/1rlSDz+/iwIFpnNTL8PzuIFcCy6OrK8htMQ4oAnnM+Ae82EQnY1h2O2oZuD4 sQWiYv2lPYI/P7A4hMkTPNzPPNXedhzsFjgrUA4AKjdMSjuEVMEQblE5+T5T0adNuX7J xZbFi0K+2MgcCCGSdeFLp6n9X9ZaHfFOZN427zDS51n0LciD2yi/Q8UVcrRmSSSwtbvB HB0/hCoGipwjYv67J2uODsU0oXaYUQ8zgy8qxyNGAN0v4VO+X+Q40ZjvYmeMt0Ae7u4W Ee1g== X-Gm-Message-State: AOAM532lB1Z62YRVQLQ9akSejkWw/scHBicnazKYAe0TqOaSJ5gDFafE jBvFbxPBz4w/DT8QfWNPZpRLmXsNcws= X-Google-Smtp-Source: ABdhPJx8/aQldYVlTK2IJCFfsX+ImwbCtnIVcIzBZCgyIrvMxEU+TrcEbmTAAYdj+46Ml9lwoGi29S9f6xs= X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:90:200:b022:92d6:d37b:686c]) (user=seanjc job=sendgmr) by 2002:a25:ad25:: with SMTP id y37mr40583994ybi.407.1632262962301; Tue, 21 Sep 2021 15:22:42 -0700 (PDT) Date: Tue, 21 Sep 2021 15:22:31 -0700 In-Reply-To: <20210921222231.518092-1-seanjc@google.com> Message-Id: <20210921222231.518092-3-seanjc@google.com> Mime-Version: 1.0 References: <20210921222231.518092-1-seanjc@google.com> X-Mailer: git-send-email 2.33.0.464.g1972c5931b-goog Subject: [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF From: Sean Christopherson To: Catalin Marinas , Will Deacon , Marc Zyngier Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Sean Christopherson X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210921_152243_992343_664520D6 X-CRM114-Status: GOOD ( 13.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Sean Christopherson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and make KVM depend on HAVE_KVM instead of directly on OF. This fixes the oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will hopefully prevent breakage if there are future users of HAVE_KVM. Note, arm64 unconditionally selects OF, and has always done so (see commit 8c2c3df31e3b ("arm64: Build infrastructure"). Keep the somewhat pointless HAVE_KVM dependency on OF to document that KVM requires Open Firmware support. No functional change intended. Signed-off-by: Sean Christopherson Acked-by: Will Deacon --- arch/arm64/Kconfig | 1 + arch/arm64/kvm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index b5b13a932561..38c0f36a5ed4 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -187,6 +187,7 @@ config ARM64 select HAVE_GCC_PLUGINS select HAVE_HW_BREAKPOINT if PERF_EVENTS select HAVE_IRQ_TIME_ACCOUNTING + select HAVE_KVM if OF select HAVE_NMI select HAVE_PATA_PLATFORM select HAVE_PERF_EVENTS diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig index c50f75cf76fe..e1e400bd8de5 100644 --- a/arch/arm64/kvm/Kconfig +++ b/arch/arm64/kvm/Kconfig @@ -20,7 +20,7 @@ if VIRTUALIZATION menuconfig KVM bool "Kernel-based Virtual Machine (KVM) support" - depends on OF + depends on HAVE_KVM select MMU_NOTIFIER select PREEMPT_NOTIFIERS select HAVE_KVM_CPU_RELAX_INTERCEPT