From: Marc Zyngier <maz@kernel.org>
To: Sascha Bischoff <Sascha.Bischoff@arm.com>
Cc: Andre Przywara <Andre.Przywara@arm.com>,
"will@kernel.org" <will@kernel.org>,
"julien.thierry.kdev@gmail.com" <julien.thierry.kdev@gmail.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"kvmarm@lists.linux.dev" <kvmarm@lists.linux.dev>,
Alexandru Elisei <Alexandru.Elisei@arm.com>, nd <nd@arm.com>
Subject: Re: [PATCH kvmtool v4 5/7] arm64: Add FEAT_E2H0 support
Date: Mon, 19 Jan 2026 09:38:58 +0000 [thread overview]
Message-ID: <867btec571.wl-maz@kernel.org> (raw)
In-Reply-To: <c83e97aec2fd95548a5c4d2aa395b7fc09a9f38d.camel@arm.com>
On Fri, 16 Jan 2026 18:12:40 +0000,
Sascha Bischoff <Sascha.Bischoff@arm.com> wrote:
>
> On Wed, 2025-09-24 at 14:45 +0100, Andre Przywara wrote:
> > From: Marc Zyngier <maz@kernel.org>
> >
> > The --nested option allows a guest to boot at EL2 without FEAT_E2H0
> > (i.e. mandating VHE support). While this is great for "modern"
> > operating
> > systems and hypervisors, a few legacy guests are stuck in a distant
> > past.
> >
> > To support those, add the --e2h0 command line option, that exposes
> > FEAT_E2H0 to the guest, at the expense of a number of other features,
> > such
> > as FEAT_NV2. This is conditioned on the host itself supporting
> > FEAT_E2H0.
> >
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>
> One inline comment below, but irrespective:
>
> Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
[...]
> > diff --git a/arm64/kvm-cpu.c b/arm64/kvm-cpu.c
> > index 42dc11dad..5e4f3a7dd 100644
> > --- a/arm64/kvm-cpu.c
> > +++ b/arm64/kvm-cpu.c
> > @@ -76,6 +76,11 @@ static void kvm_cpu__select_features(struct kvm
> > *kvm, struct kvm_vcpu_init *init
> > if (!kvm__supports_extension(kvm, KVM_CAP_ARM_EL2))
> > die("EL2 (nested virt) is not supported");
> > init->features[0] |= 1UL << KVM_ARM_VCPU_HAS_EL2;
> > + if (kvm->cfg.arch.e2h0) {
> > + if (!kvm__supports_extension(kvm,
> > KVM_CAP_ARM_EL2_E2H0))
> > + die("FEAT_E2H0 is not supported");
> > + init->features[0] |= 1UL <<
> > KVM_ARM_VCPU_HAS_EL2_E2H0;
> > + }
>
> --e2h0 is only consumed if --nested is also set (correctly so, by my
> understanding & the KVM docs).
>
> Maybe it is worth printing that it isn't consumed without --nested if
> only --e2h0 is supplied? Avoids the user thinking that it has an effect
> when it doesn't. (Alternatively, make --e2h0 imply --nested, but I'm
> not a fan of that, personally.)
Sure, I can add a warning indicating that the option is ignored.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2026-01-19 9:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 13:45 [PATCH kvmtool v4 0/7] arm64: Nested virtualization support Andre Przywara
2025-09-24 13:45 ` [PATCH kvmtool v4 1/7] Sync kernel UAPI headers with v6.16 Andre Przywara
2025-09-24 13:45 ` [PATCH kvmtool v4 2/7] arm64: Initial nested virt support Andre Przywara
2026-01-16 18:07 ` Sascha Bischoff
2025-09-24 13:45 ` [PATCH kvmtool v4 3/7] arm64: nested: Add support for setting maintenance IRQ Andre Przywara
2026-01-16 18:10 ` Sascha Bischoff
2026-01-19 9:13 ` Marc Zyngier
2026-01-22 15:54 ` Andre Przywara
2026-01-22 16:45 ` Sascha Bischoff
2025-09-24 13:45 ` [PATCH kvmtool v4 4/7] arm64: Add counter offset control Andre Przywara
2026-01-16 18:13 ` Sascha Bischoff
2025-09-24 13:45 ` [PATCH kvmtool v4 5/7] arm64: Add FEAT_E2H0 support Andre Przywara
2026-01-16 18:12 ` Sascha Bischoff
2026-01-19 9:38 ` Marc Zyngier [this message]
2025-09-24 13:45 ` [PATCH kvmtool v4 6/7] arm64: Generate HYP timer interrupt specifiers Andre Przywara
2026-01-16 18:14 ` Sascha Bischoff
2025-09-24 13:45 ` [PATCH kvmtool v4 7/7] arm64: Handle virtio endianness reset when running nested Andre Przywara
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=867btec571.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Alexandru.Elisei@arm.com \
--cc=Andre.Przywara@arm.com \
--cc=Sascha.Bischoff@arm.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=nd@arm.com \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox