public inbox for kvm@vger.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,
	ajones@ventanamicro.com
Subject: Re: [PATCH 1/4] KVM: introduce CONFIG_KVM_COMMON
Date: Fri, 5 Jan 2024 12:57:51 -0800	[thread overview]
Message-ID: <ZZhtT7gha4PnJm-E@google.com> (raw)
In-Reply-To: <CABgObfYvuBeN6Vhp7TUBP9g8G8H2DvMQ=RJGWGNdCoS8k+AWfw@mail.gmail.com>

On Fri, Jan 05, 2024, Paolo Bonzini wrote:
> On Fri, Jan 5, 2024 at 8:13 PM Sean Christopherson <seanjc@google.com> wrote:
> > > 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.
> 
> There is one extra thing that CONFIG_KVM_COMMON does, which is to
> avoid having to select common requirements in all architectures.

Oooh, gotcha.  FWIW, I would love to unify the "menuconfig VIRTUALIZATION" and
"config KVM" entries, but I can't think of a sane way to do that without ending
up with something like KVM_COMMON. :-/

> I jotted this to solve the reported randconfig failure, which is why
> CONFIG_KVM_COMMON only requires "select EVENTFD", but looking more
> closely it should also select PREEMPT_NOTIFIERS and INTERVAL_TREE.
> Both are used by virt/kvm/kvm_main.c, and loongarch + riscv both lack
> INTERVAL_TREE so I do think it's a good idea to introduce this symbol
> (though it requires a v2).
> 
> > [*] https://lore.kernel.org/all/20230916003118.2540661-12-seanjc@google.com
> 
> I guess you mean
> https://lore.kernel.org/all/20230916003118.2540661-8-seanjc@google.com/.

Doh, yes.

  reply	other threads:[~2024-01-05 20:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04 20:59 [PATCH 0/4] Replace CONFIG_HAVE_KVM with more appropriate symbols Paolo Bonzini
2024-01-04 20:59 ` [PATCH 1/4] KVM: introduce CONFIG_KVM_COMMON Paolo Bonzini
2024-01-05  9:37   ` Andrew Jones
2024-01-05 19:13   ` Sean Christopherson
2024-01-05 20:28     ` Paolo Bonzini
2024-01-05 20:57       ` Sean Christopherson [this message]
2024-01-04 20:59 ` [PATCH 2/4] MIPS: introduce Kconfig for MIPS VZ Paolo Bonzini
2024-01-04 20:59 ` [PATCH 3/4] x86, vfio, gdb: replace CONFIG_HAVE_KVM with IS_ENABLED(CONFIG_KVM) Paolo Bonzini
2024-01-04 20:59 ` [PATCH 4/4] treewide: remove CONFIG_HAVE_KVM 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=ZZhtT7gha4PnJm-E@google.com \
    --to=seanjc@google.com \
    --cc=ajones@ventanamicro.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox