From: Mostafa Saleh <smostafa@google.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
catalin.marinas@arm.com, will@kernel.org, rppt@kernel.org,
maz@kernel.org
Subject: Re: [PATCH 3/3] arm64/coco: Add pKVM as a CC platform
Date: Fri, 12 Jun 2026 08:44:06 +0000 [thread overview]
Message-ID: <aivG1rEi3y4GN8kX@google.com> (raw)
In-Reply-To: <yq5a1pemsmuj.fsf@kernel.org>
On Thu, Jun 04, 2026 at 02:29:00PM +0530, Aneesh Kumar K.V wrote:
> Mostafa Saleh <smostafa@google.com> writes:
>
> > pKVM does support memory encryption, expose that to the rest of
> > the kernel through cc_platform_has()
> >
> > At the moment, all devices inside the guest are emulated which
> > requires its memory to be shared back to the host (decrypted), so
> > set force_dma_unencrypted() to always return true.
> >
> > Although, typically pKVM guests rely on restricted-dma-pools to
> > bounce traffic, with this change, it is possible to solely rely on
> > the default SWIOTLB for that (assuming the appropriate size is set
> > from the command line)
> >
> > Signed-off-by: Mostafa Saleh <smostafa@google.com>
> > ---
> > This change is critical for the ongoing refactoring of the DMA-API[1]
> > that will break protected guests under pKVM with this patch. That is
> > due to this rework will make the state of the SWIOTLB and restricted
> > dma pools depends on the value returned by cc_platform_has()
> >
> > [1] https://lore.kernel.org/all/20260522042815.370873-1-aneesh.kumar@kernel.org/
> > ---
> > arch/arm64/include/asm/hypervisor.h | 13 +++++++++++++
> > arch/arm64/include/asm/mem_encrypt.h | 3 ++-
> > arch/arm64/kernel/rsi.c | 12 ------------
> > arch/arm64/mm/init.c | 15 ++++++++++++++-
> > drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c | 3 +++
> > 5 files changed, 32 insertions(+), 14 deletions(-)
> >
> > index d66291def0f4..26fe9c3f22e3 100644
[...]
> > --- a/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c
> > +++ b/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c
> > @@ -17,6 +17,7 @@
> > #include <asm/hypervisor.h>
> >
> > static size_t pkvm_granule;
> > +DEFINE_STATIC_KEY_FALSE_RO(pkvm_guest);
> >
>
> Do we need EXPORT_SYMBOL on this?
I was not sure about that, all users of this are in tree, I saw RME
code have the EXPORT but did not know why?
Thanks,
Mostafa
>
>
> -aneesh
prev parent reply other threads:[~2026-06-12 8:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 11:05 [PATCH 0/3] arm64/coco: Convert pKVM to a CC platform Mostafa Saleh
2026-06-03 11:05 ` [PATCH 1/3] arm64/mm: Simplify SWIOTLB setup in arch_mm_preinit() Mostafa Saleh
2026-06-03 12:27 ` Mike Rapoport
2026-06-03 13:13 ` Mostafa Saleh
2026-06-04 9:03 ` Aneesh Kumar K.V
2026-06-04 8:55 ` Aneesh Kumar K.V
2026-06-03 11:05 ` [PATCH 2/3] drivers/virt: pkvm: Fix end calculation in mmio_guard_ioremap_hook() Mostafa Saleh
2026-06-03 11:05 ` [PATCH 3/3] arm64/coco: Add pKVM as a CC platform Mostafa Saleh
2026-06-04 8:59 ` Aneesh Kumar K.V
2026-06-12 8:44 ` Mostafa Saleh [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=aivG1rEi3y4GN8kX@google.com \
--to=smostafa@google.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=rppt@kernel.org \
--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