All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	 torvalds@linux-foundation.org
Subject: Re: [PATCH 1/2] KVM: x86: leave kvm.ko out of the build if no vendor module is requested
Date: Fri, 4 Oct 2024 07:27:49 -0700	[thread overview]
Message-ID: <Zv_0GzOkrPVCRfP1@google.com> (raw)
In-Reply-To: <20241003230806.229001-2-pbonzini@redhat.com>

On Thu, Oct 03, 2024, Paolo Bonzini wrote:
> kvm.ko is nothing but library code shared by kvm-intel.ko and kvm-amd.ko.
> It provides no functionality on its own and it is unnecessary unless one
> of the vendor-specific module is compiled.  In particular, /dev/kvm is
> not created until one of kvm-intel.ko or kvm-amd.ko is loaded.
> 
> Use CONFIG_KVM to decide if it is built-in or a module, but use the
> vendor-specific modules for the actual decision on whether to build it.
> 
> This also fixes a build failure when CONFIG_KVM_INTEL and CONFIG_KVM_AMD
> are both disabled.  The cpu_emergency_register_virt_callback() function
> is called from kvm.ko, but it is only defined if at least one of
> CONFIG_KVM_INTEL and CONFIG_KVM_AMD is provided.
> 
> Fixes: 590b09b1d88e ("KVM: x86: Register "emergency disable" callbacks when virt is enabled")
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  arch/x86/kvm/Kconfig  | 7 +++++--
>  arch/x86/kvm/Makefile | 2 +-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
> index 730c2f34d347..81bce9dd9331 100644
> --- a/arch/x86/kvm/Kconfig
> +++ b/arch/x86/kvm/Kconfig
> @@ -17,8 +17,8 @@ menuconfig VIRTUALIZATION
>  
>  if VIRTUALIZATION
>  
> -config KVM
> -	tristate "Kernel-based Virtual Machine (KVM) support"
> +config KVM_X86_COMMON

Maybe just KVM_X86?  I doubt anyone in KVM will care too much, and for the rest
of the kernel, CONFIG_KVM_X86 is likely more intuitive than CONFIG_KVM_X86_COMMON.

  reply	other threads:[~2024-10-04 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03 23:08 [PATCH 0/2] KVM: x86: only build common code if at least one vendor module was picked Paolo Bonzini
2024-10-03 23:08 ` [PATCH 1/2] KVM: x86: leave kvm.ko out of the build if no vendor module is requested Paolo Bonzini
2024-10-04 14:27   ` Sean Christopherson [this message]
2024-10-05  0:30   ` kernel test robot
2024-10-05 20:43   ` kernel test robot
2024-10-03 23:08 ` [PATCH 2/2] x86/reboot: emergency callbacks are now registered by common KVM code Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zv_0GzOkrPVCRfP1@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.