[PATCH v7 23/23] KVM: s390: arm64: Add KVM_S390_ARM64 Kconfig and Makefile
Steffen Eiden
seiden at linux.ibm.com
Thu Sep 3 01:38:57 PDT 2026
On Wed, Sep 02, 2026 at 09:20:23AM -0700, Sean Christopherson wrote:
> On Mon, Aug 31, 2026, Steffen Eiden wrote:
> > diff --git a/arch/s390/kvm/Kconfig b/arch/s390/kvm/Kconfig
> > index 8d3ee17a1bcb..9c69ea16031e 100644
> > --- a/arch/s390/kvm/Kconfig
> > +++ b/arch/s390/kvm/Kconfig
> > @@ -53,4 +53,33 @@ config KVM_S390_UCONTROL
> >
> > If unsure, say N.
> >
> > +config KVM_S390_ARM64
> > + def_tristate y
> > + prompt "KVM support for hardware accelerated arm64 guests"
> > + depends on HAS_IOMEM
> > + depends on KVM
>
> Is this actually necessary? I.e. does kvm.ko need to be *loaded* in order for
> kvm-arm64.ko to be loaded?
>
> If kvm-arm64.ko does indeed have a hard dependency on kvm.ko, then I think it
> makes sense to not have redundant "select" statements below. As an outsider,
> it's super confusing because the KVM_S390_ARM64 are incomplete, e.g. are lacking
> things like VIRT_XFER_TO_GUEST_WORK (at least, I assume those are lacking), and
> makes it hard to see what is actually unique to kvm-arm64.ko.
>
> If kvm-arm64.ko doesn't have a dependency on kvm.ko, e.g. to initialize hardware
> or something, then this "depends on" should go away.
It is a bit more complicated unfortunately. KVM_S390_ARM64 depends on
KVM as there is code around in the kernel & drivers (arch and common)
which depends on CONFIG_KVM we need as well. I did not want to leak arch
local configs to common code if I can avoid that.
I could change it to select KVM ? Do you have another idea on how to
solve this issue?
The two modules are completely independent at compile and runtime. So
kvm does not have to be loaded for kvm-arm64 to work.
VIRT_XFER_TO_GUEST_WORK is only lacking for now. I will add it later.
Currently the kvm-arm64 module is incomplete anyways but I did not want
to send a 60+patches series and rather stage the introduction over
multiple series.
I will remove the duplicated config selections. Thanks for pointing it
out. In previous series I had an explicit KVM_S390 config. Both KVM_S390
and KVM_ARM64 selected KVM. But this created too much churn around the
whole tech-stack (default config change, s390 is the odd one out for the
KVM config meaning, ...).
Steffen
More information about the linux-arm-kernel
mailing list