From: Marc Zyngier <maz@kernel.org>
To: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org, oliver.upton@linux.dev,
joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com,
darren@os.amperecomputing.com
Subject: Re: [PATCH] KVM: arm64: nv: Forward hvc traps if originated from nested VM
Date: Thu, 10 Apr 2025 11:52:00 +0100 [thread overview]
Message-ID: <86jz7sl25r.wl-maz@kernel.org> (raw)
In-Reply-To: <4d1bdea5-43c3-4ca9-9275-feadf158e86e@os.amperecomputing.com>
On Thu, 10 Apr 2025 11:20:24 +0100,
Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> wrote:
>
>
>
> On 10-04-2025 12:49 pm, Marc Zyngier wrote:
> > On Thu, 10 Apr 2025 08:07:43 +0100,
> > Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> wrote:
> >>
> >> It was discovered while trying selftest(smccc_filter) that the
> >> hvc trap is getting forwarded to guest hypervisor even if it is
> >> originated from itself.
> >>
> >> HVC traps from guest hypervisor should be handled by the host
> >> hypervisor and traps originating from nested VM should be
> >> forwarded. Adding check to forward only if the hvc is trapped
> >> from the nested VM.
> >
> > I disagree. HVC from EL2 must be routed to the same EL2. HVC from EL1
> > must be routed to the EL2 controlling EL1.
>
> Thanks, Understood, In NV case, hvc has to be forwarded to L1
> irrespective of it origin (L1 or L2). Need to add hvc handler in the
> smccc_filter.c for the vm (when run as L1), so that it is handled and
> returns with required args set.
Why? This test checks under which conditions an HVC/SMC gets routed to
userspace. What does it even mean to test HVC if it doesn't make it
outside of the guest itself?
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2025-04-10 11:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 7:07 [PATCH] KVM: arm64: nv: Forward hvc traps if originated from nested VM Ganapatrao Kulkarni
2025-04-10 7:19 ` Marc Zyngier
2025-04-10 10:20 ` Ganapatrao Kulkarni
2025-04-10 10:52 ` Marc Zyngier [this message]
2025-04-10 13:22 ` Ganapatrao Kulkarni
2025-04-10 17:31 ` Oliver Upton
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=86jz7sl25r.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=darren@os.amperecomputing.com \
--cc=gankulkarni@os.amperecomputing.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=yuzenghui@huawei.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;
as well as URLs for NNTP newsgroup(s).