From: Will Deacon <will@kernel.org>
To: DaeRo Lee <skseofh@gmail.com>
Cc: alexandru.elisei@arm.com, james.morse@arm.com,
kernel-team@android.com, kvmarm@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, maz@kernel.org,
oliver.upton@linux.dev, qperret@google.com,
sebastianene@google.com, sudeep.holla@arm.com,
suzuki.poulose@arm.com, tabba@google.com
Subject: Re: [PATCH v3 08/10] KVM: arm64: Handle FFA_MEM_LEND calls from the host
Date: Sun, 13 Jul 2025 21:01:12 +0100 [thread overview]
Message-ID: <aHQQiJr2xLe9KotP@willie-the-truck> (raw)
In-Reply-To: <20250713145957.623842-1-skseofh@naver.com>
On Sun, Jul 13, 2025 at 11:59:57PM +0900, DaeRo Lee wrote:
> > > > Handle FFA_MEM_LEND calls from the host by treating them identically to
> > > > FFA_MEM_SHARE calls for the purposes of the host stage-2 page-table, but
> > > > forwarding on the original request to EL3.
> > >
> > > I have a question about your patch.
> > > Does treating FFA_MEM_LEND as identical to FFA_MEM_SHARE imply that
> > > the host can still access the memory even after it has been lent?
> >
> > Only if your TZ implementation is broken and relies on the NS hypervisor
> > for isolation.
>
> I believe pKVM is managing stage 2 isolation between Host and Non-secure Guest
> VMs or between Non-secure Guest VMs
>
> <Quote DEN0140_FF-A_Memory Management Protocol>
> 2.2.1.2 Relayer responsibilities
> 10. Unmap the memory region from the translation regime of the Lender, if
> managed by the Relayer as specified in 1.2 Address translation regimes. This
> must be done only if the memory region is in the Owner-EA state. This includes
> removing access to the memory region from any DMA capable devices assigned to
> the Lender.
>
> From the content, it seems that when performing a Lend operation, it's
> necessary to perform a Stage 2 unmap of the host memory area. Am I understanding
> this correctly?
No.
pKVM doesn't use FF-A to manage host/guest page ownership.
FF-A is only used for memory management with the Secure world, in which
case a LEND transaction will mean that the Secure world must prevent
Non-Secure access to the memory itself and not rely on pKVM to unmap
at stage-2.
Will
next prev parent reply other threads:[~2025-07-13 20:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAATEi5=y6w3jziwKbrnUkWGy=RTGh=+jKdrXEnOdAiEcH=npOQ@mail.gmail.com>
2025-07-13 11:26 ` [PATCH v3 08/10] KVM: arm64: Handle FFA_MEM_LEND calls from the host Will Deacon
2025-07-13 14:59 ` DaeRo Lee
2025-07-13 20:01 ` Will Deacon [this message]
2025-07-14 2:14 ` DaeRo Lee
2025-07-14 9:58 ` Will Deacon
[not found] <aHQQiJr2xLe9KotP@while-the-truck>
2025-07-14 1:49 ` DaeRo Lee
2023-05-23 10:18 [PATCH v3 00/10] KVM: arm64: FF-A proxy for pKVM Will Deacon
2023-05-23 10:18 ` [PATCH v3 08/10] KVM: arm64: Handle FFA_MEM_LEND calls from the host Will Deacon
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=aHQQiJr2xLe9KotP@willie-the-truck \
--to=will@kernel.org \
--cc=alexandru.elisei@arm.com \
--cc=james.morse@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=qperret@google.com \
--cc=sebastianene@google.com \
--cc=skseofh@gmail.com \
--cc=sudeep.holla@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.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