Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp331981rdb; Fri, 5 Jan 2024 11:13:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsPZlZDOjkRj1gCbJGT8KuEa5q3WQ+g06ldjdi944mvpLiljze9NMwyYfZLYa4qgbQdF45 X-Received: by 2002:a05:6358:5290:b0:175:78e5:5e45 with SMTP id g16-20020a056358529000b0017578e55e45mr670239rwa.29.1704482025556; Fri, 05 Jan 2024 11:13:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704482025; cv=none; d=google.com; s=arc-20160816; b=pF6y+73su1JqchI8CWJ4eha79oU04XE4Kvb4B0HuF7NrZourEjxqijzq6t0koDyGSA TA3WKG87ylcwJ7PuoHDJ4ajqoBVZbf5xvfHoDOqZpY2G+sOcQcPFsmscMbZoP2rR3tu0 vy9JZEroX9M05x0cYW8oB0cq4qgkKjlwQjVViPOO/65DIe+gPet7X9a9KOfMNSUJE1Z7 qvgvVkKOp4USeW6E9QYIAuLNMJqAISM5z8Y9S/tt7c85+ie26x3ttCgcxwYx+OVoUURa tcxkIBwAAEvoidJKzSg7SiMaV3zS9gjUEGN2ai/cMSEJ56qIBUn92dB4KassqH7qaFWJ RVrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=eg/8mKksjoiQYmouE2QXUDAfddgsPyrpn2yVTAfF/gA=; fh=r4X4PGgalpArIrp2jji2JLzbyzvwbnh3SICB/u9VL2k=; b=cjzWiLKmQgnO+qehxHduTVmnk/D4wQ/TJ3mVu4LpCNoY7NZ/YXCk79KPDzhNG60voX VuzH9LdaeJY4gN6N56J7xOmY5kXILQcOZgl/MC1g4wstDjqrqXg/OmrGtfWiGcLgOxmd 0tIuHkdy7I6rPJp0Yg+iprxhLN4ry/tws+tGIv1Qhyir5tVRJ+0zeZWh1IXm/uMj/3wm FvlO8wOURYweNsO1zB79gPMn+sxLO+RlGuEG8Tr+FcTSjugNlkeDyl+c698M1FQODSlg 9azDOpIMr9kb1JYdWrfqPjpQUBc184YXQFIhaGolt2NX1laTPhTiTY5usaI+YN71amHQ G0Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=DTF6IjL8; spf=pass (google.com: domain of linux-kernel+bounces-18292-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z6-20020ac87f86000000b004281324b8f2si2506407qtj.342.2024.01.05.11.13.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 11:13:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18292-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=DTF6IjL8; spf=pass (google.com: domain of linux-kernel+bounces-18292-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4F2141C235EE for ; Fri, 5 Jan 2024 19:13:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 793BF36094; Fri, 5 Jan 2024 19:13:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="DTF6IjL8" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68A0635F12 for ; Fri, 5 Jan 2024 19:13:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-5eb6dba1796so36863687b3.1 for ; Fri, 05 Jan 2024 11:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704482000; x=1705086800; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=eg/8mKksjoiQYmouE2QXUDAfddgsPyrpn2yVTAfF/gA=; b=DTF6IjL83TxpWDdsRJEYo+guuDdTCxMhNxs04t/lmo+yP92MBPClRS0otefqFaxSK4 ylFbArCkpsq8T5jk9sg/Vm8OjP7l0yAv1eLHNGN9YamJCMebzJ5IydZ7fEUuu6ZPZ2S8 n7kyxVewGipoCcttxuE6dfQcwdC1WaPoYz83PkizyK9VSKmSFInYnHd9Ow5A0+33H8s8 f7qGaar+oDa19yqXaIRNNhZZ8HUFHqv2NbWAemAHi34qYFEGYWhn2nwOx55fugWLjxvv nim7UskvJluPNz4pV7wJuN6TEBT530doxtVPlOYh9p+EUAyKl0yKpSgkvUuKfOVZBX9K zqqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704482000; x=1705086800; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eg/8mKksjoiQYmouE2QXUDAfddgsPyrpn2yVTAfF/gA=; b=E2S+pmn4LW7DlxpSPdICK+XTSo6pTEbDlwSdzbgjd0ZTaj+pgvWuEA4HeohLhhexKW 2Se57ZNHqn778+ZExVTlwYTbAXujp+xT1qxirQ7QC7fnyPhfC2K1P7ct9ptt/q0TYWii rOcx7LI1VuUcb/hQot1czRTIs4FFZzI1ZcjswfUvEYsnwHJFOjov90dr+hM8D2CZ7iH4 ZuMupHXidp7VBwsg8b0cKmBw3lu2FPaGjw3jfCWcc/fAPnDt7fPVIkpAMhkLY47qE6qB t6tFYU/f2OIrQJdQjQTgvHTWMGyn+E7s6LOgDR2kRyn5BIkFA0HkVSXi76JqlsPrS1zu l/vg== X-Gm-Message-State: AOJu0YwDTpXZbLRNaz8t0Pqg/mkQF6iAUD3/f1jSAiKJGu6EbAE6Avc4 0iuPFcf0KTjW121SYFkovosvhnoH0xKduVAcpw== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:350a:b0:5e6:bcea:df68 with SMTP id fq10-20020a05690c350a00b005e6bceadf68mr1332014ywb.8.1704482000216; Fri, 05 Jan 2024 11:13:20 -0800 (PST) Date: Fri, 5 Jan 2024 11:13:18 -0800 In-Reply-To: <20240104205959.4128825-2-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240104205959.4128825-1-pbonzini@redhat.com> <20240104205959.4128825-2-pbonzini@redhat.com> Message-ID: Subject: Re: [PATCH 1/4] KVM: introduce CONFIG_KVM_COMMON From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, ajones@ventanamicro.com Content-Type: text/plain; charset="us-ascii" On Thu, Jan 04, 2024, Paolo Bonzini wrote: > CONFIG_HAVE_KVM is currently used by some architectures to either > enabled the KVM config proper, or to enable host-side code that is > not part of the KVM module. However, the "select" statement in > virt/kvm/Kconfig corresponds to a third meaning, namely to > enable common Kconfigs required by all architectures that support > KVM. > > These three meanings can be replaced respectively by an > architecture-specific Kconfig, by IS_ENABLED(CONFIG_KVM), or by > a new Kconfig symbol that is in turn selected by the > architecture-specific "config KVM". > > Start by introducing such a new Kconfig symbol, CONFIG_KVM_COMMON. > Unlike CONFIG_HAVE_KVM, it is selected by CONFIG_KVM, not by > architecture code. Why? I don't get it, just have code that cares do IS_ENABLED(CONFIG_KVM). Except for the MIPS usage of HAVE_KVM that you solved by adding CPU_SUPPORTS_VZ, I got all the way there using just CONFIG_KVM[*]. Ah, and so does this series for the most part, the only usage of CONFIG_KVM_COMMON is in scripts/gdb/linux/constants.py.in. Honestly, adding a Kconfig just so that VMX's posted interrupts that arrive in the host can be printed when KVM is built as a module is a waste of a Kconfig. [*] https://lore.kernel.org/all/20230916003118.2540661-12-seanjc@google.com