All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Donnefort <vdonnefort@google.com>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: maz@kernel.org, oupton@kernel.org, kvmarm@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, joey.gouly@arm.com,
	seiden@linux.ibm.com, suzuki.poulose@arm.com,
	yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org,
	kernel-team@android.com, qperret@google.com
Subject: Re: [PATCH v1 2/2] KVM: arm64: Fix bpages backing allocation size in hyp_trace
Date: Fri, 9 Oct 2026 09:39:15 +0100	[thread overview]
Message-ID: <asioMxhIlMm9PSQK@google.com> (raw)
In-Reply-To: <CA+EHjTzpKk3hUTriyRF-YWkNQpQ82vuJoqKkW+uo+6n5f2mhmg@mail.gmail.com>

On Thu, Oct 08, 2026 at 08:13:29PM +0100, Fuad Tabba wrote:
> On Thu, 8 Oct 2026 at 11:42, Vincent Donnefort <vdonnefort@google.com> wrote:
> >
> > hyp_trace_buffer_alloc_bpages_backing() computes nr_bpages as
> > (PAGE_ALIGN(size) / PAGE_SIZE) + 1, whereas trace_remote_alloc_buffer()
> > takes into account the buffer page header.
> >
> > Align the bpages backing allocation by using
> > __calc_nr_pages_ring_buffer_desc(). There's no need to validate
> > nr_bpages again, it has been before with trace_buffer_desc_size().
> >
> > Fixes: 3aed038aac8d ("KVM: arm64: Add trace remote for the nVHE/pKVM hyp")
> 
> Should this have Cc: stable too, like patch 1? The undercount is there
> since 3aed038aac8d for small buffers, and 442ffa742daa6
> ("tracing/remotes: Account for ring buffer page header in size
> calculation") makes it reachable at ordinary sizes.
> 
> Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev>
> Tested-by: Fuad Tabba <fuad.tabba@linux.dev>
> 
> Cheers,
> /fuad
> 
> To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com.
>

Yeah I wasn't sure, because __calc_nr_pages_ring_buffer_desc() was introduced
later.

But I can figure it out once the patch fails to apply and provide the
appropriate backport.

Thanks for the review.

-- 
Vincent

  reply	other threads:[~2026-10-09  8:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 10:42 [PATCH v1 0/2] KVM: arm64: Fixes for hyp_trace Vincent Donnefort
2026-10-08 10:42 ` [PATCH v1 1/2] KVM: arm64: Prevent 64-bit overflow when computing hyp clock rate Vincent Donnefort
2026-10-08 19:12   ` Fuad Tabba
2026-10-08 10:42 ` [PATCH v1 2/2] KVM: arm64: Fix bpages backing allocation size in hyp_trace Vincent Donnefort
2026-10-08 10:56   ` sashiko-bot
2026-10-08 19:13   ` Fuad Tabba
2026-10-09  8:39     ` Vincent Donnefort [this message]
2026-10-10  9:48 ` [PATCH v1 0/2] KVM: arm64: Fixes for hyp_trace Marc Zyngier

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=asioMxhIlMm9PSQK@google.com \
    --to=vdonnefort@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=fuad.tabba@linux.dev \
    --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=oupton@kernel.org \
    --cc=qperret@google.com \
    --cc=seiden@linux.ibm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --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 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.