Re: [PATCH 1/4] KVM: introduce CONFIG_KVM_COMMON

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 5, 2024 at 8:13 PM Sean Christopherson <seanjc@xxxxxxxxxx> 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.

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@xxxxxxxxxx

I guess you mean
https://lore.kernel.org/all/20230916003118.2540661-8-seanjc@xxxxxxxxxx/.

Paolo






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux