From: Marc Zyngier <maz@kernel.org>
To: mankyum.kim@samsung.com
Cc: Oliver Upton <oupton@kernel.org>, Will Deacon <will@kernel.org>,
Fuad Tabba <fuad.tabba@linux.dev>,
Andrew Walbran <qwandor@google.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: Allow smaller FF-A RX/TX buffers
Date: Thu, 20 Aug 2026 09:30:16 +0100 [thread overview]
Message-ID: <875x15p52f.wl-maz@kernel.org> (raw)
In-Reply-To: <20260820-master-v1-1-ea602b6d3860@samsung.com>
On Thu, 20 Aug 2026 06:42:31 +0100,
Kim Mankyum via B4 Relay <devnull+mankyum.kim.samsung.com@kernel.org> wrote:
>
> From: Kim Mankyum <mankyum.kim@samsung.com>
>
> pKVM currently requires the host to map PAGE_SIZE worth of RX/TX
> buffers, as do_ffa_rxtx_map() requires the FF-A page count to match
> the capacity of the hypervisor RX/TX buffers.
>
> This is unnecessarily restrictive when the kernel page size is larger
> than the minimum RX/TX buffer size advertised by the SPMC. For
> example, with a 16K kernel and an SPMC advertising a minimum RX/TX
> buffer size of 4K, a host request with a page count of one is rejected
> by pKVM.
>
> hyp_ffa_post_init() already allows an SPMC whose minimum RX/TX buffer
> size is smaller than PAGE_SIZE, and the page count supplied by the host
> is forwarded unchanged when mapping the hypervisor buffers into the
> SPMC.
>
> Allow RX/TX buffers smaller than the capacity of the hypervisor buffers
> while continuing to reject requests which exceed it.
You don't explain why this is safe.
Are you guaranteed that the physical page stays accessible to the
host?
What happens if another range in the same physical page gets shared
again? Best case, this will fail, but why is that an acceptable
behaviour?
You need to provide answers to these questions before we can consider
this change.
Thanks,
M.
--
Jazz isn't dead. It just smells funny.
prev parent reply other threads:[~2026-08-20 8:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 5:42 [PATCH] KVM: arm64: Allow smaller FF-A RX/TX buffers Kim Mankyum via B4 Relay
2026-08-20 8:30 ` Marc Zyngier [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=875x15p52f.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=fuad.tabba@linux.dev \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mankyum.kim@samsung.com \
--cc=oupton@kernel.org \
--cc=qwandor@google.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