All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Vincent Donnefort <vdonnefort@google.com>
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, 07 Jan 2025 09:31:16 +0000	[thread overview]
Message-ID: <86zfk3nf6j.wl-maz@kernel.org> (raw)
In-Reply-To: <20250106183213.4094616-1-vdonnefort@google.com>

Vincent,

Please add all the KVM/arm64 reviewers in the future (I added them
this time).

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.

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.

  reply	other threads:[~2025-01-07  9:31 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 [this message]
2025-01-07 10:34   ` Vincent Donnefort

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=86zfk3nf6j.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=joey.gouly@arm.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=vdonnefort@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.