From: Vincent Donnefort <vdonnefort@google.com>
To: Marc Zyngier <maz@kernel.org>
Cc: oliver.upton@linux.dev, kvmarm@lists.linux.dev,
kernel-team@android.com, linux-arm-kernel@lists.infradead.org,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Joey Gouly <joey.gouly@arm.com>,
Zenghui Yu <zenghui.yu@linux.dev>
Subject: Re: [PATCH] KVM: arm64: Fix nVHE stacktrace VA bits mask
Date: Tue, 7 Jan 2025 10:34:58 +0000 [thread overview]
Message-ID: <Z30DUhWWMZurEu33@google.com> (raw)
In-Reply-To: <86zfk3nf6j.wl-maz@kernel.org>
On Tue, Jan 07, 2025 at 09:31:16AM +0000, Marc Zyngier wrote:
> Vincent,
>
> Please add all the KVM/arm64 reviewers in the future (I added them
> this time).
Ack, apologies for the missing recipients.
>
> On Mon, 06 Jan 2025 18:32:13 +0000,
> Vincent Donnefort <vdonnefort@google.com> wrote:
> >
> > The hypervisor VA space size depends on both the ID map's
> > (IDMAP_VA_BITS) and the kernel stage-1 (VA_BITS). When VA_BITS is
> > smaller than IDMAP_VA_BITS (i.e. 39-bit), the stacktrace can contain
> > addresses bigger than the current VA_BITS mask.
> >
> > As the hyp_va_bits value needs to be used outside of the init code now,
> > use a global variable, shared by all the kvm users in mmu.c, arm.c and
> > now stacktrace.c.
>
> I tend to dislike this approach for at least three reasons:
>
> - it makes it hard to follow *when* hyp_va_bits is made valid, while
> passing the value as a parameter is self explanatory. Specially
> given how convoluted the nVHE/pKVM init is these days.
>
> - it prevents the eventual use of *multiple* VA bit values (one for
> TTBR0, one for TTBR1) once the grand plan for hVHE is completed
> (right after full NV support is merged! ;-)
>
> - it makes the change larger than it should be, specially for
> something that should be backported.
I was myself not completely convinced because of that last point. I'll send a v2
with a shorter version.
Thanks for your swift review!
>
> So I'd rather you keep the general shape of the code as it, and simply
> publish this 'hyp_va_bits' for the purpose of the backtrace code.
>
> Thanks,
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2025-01-07 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 18:32 [PATCH] KVM: arm64: Fix nVHE stacktrace VA bits mask Vincent Donnefort
2025-01-07 9:31 ` Marc Zyngier
2025-01-07 10:34 ` Vincent Donnefort [this message]
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=Z30DUhWWMZurEu33@google.com \
--to=vdonnefort@google.com \
--cc=joey.gouly@arm.com \
--cc=kernel-team@android.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=zenghui.yu@linux.dev \
/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).