All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kameron Carr" <kameroncarr@linux.microsoft.com>
To: "'Michael Kelley'" <mhklinux@outlook.com>, <kys@microsoft.com>,
	<haiyangz@microsoft.com>, <wei.liu@kernel.org>,
	<decui@microsoft.com>, <longli@microsoft.com>
Cc: <catalin.marinas@arm.com>, <will@kernel.org>,
	<mark.rutland@arm.com>, <lpieralisi@kernel.org>,
	<sudeep.holla@kernel.org>, <arnd@arndb.de>, <thuth@redhat.com>,
	<linux-hyperv@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-arch@vger.kernel.org>
Subject: RE: [PATCH v2 4/6] Drivers: hv: Mark shared memory as decrypted for CCA Realms
Date: Tue, 21 Jul 2026 11:43:45 -0700	[thread overview]
Message-ID: <000c01dd1940$e3e267d0$aba73770$@linux.microsoft.com> (raw)
In-Reply-To: <SN6PR02MB41571AB004406F331E167203D4EB2@SN6PR02MB4157.namprd02.prod.outlook.com>

On Friday, June 26, 2026 8:04 AM, Michael Kelley wrote:
> From: Kameron Carr <kameroncarr@linux.microsoft.com> Sent: Friday, June
> 26, 2026 4:09 AM
> >
> > On Thursday, June 25, 2026 11:59 AM, Michael Kelley wrote:
> > > From: Kameron Carr <kameroncarr@linux.microsoft.com> Sent: Thursday,
> > > June 25, 2026 10:35 AM
> > > > We need to round up the memory allocated for the input/output pages
> to
> > > > the nearest PAGE_SIZE, since set_memory_decrypted() requires the
size
> to
> > > > be a multiple of PAGE_SIZE. This only has an effect on ARM VMs that
> are
> > > > using PAGE_SIZE larger than 4K.
> > >
> > > I think this change resulted from a Sashiko comment. My understanding
is
> > > that the ARM CCA architecture only supports CCA guests with 4 KiB page
> > > size. Is that still the case, or has that restriction been lifted in a
later
> version
> > > of the architecture? I'm in favor of handling the larger page sizes,
if only
> for
> > > future proofing. But I wondered whether your intent is to always
support
> > > > 4 KiB page sizes even if CCA doesn't support them now. Another way
to
> > > put it: In reviewing code, should I flag issues related to page sizes
> 4 KiB?
> >
> > I think you might be right. I'm looking at RMM spec 2.0 beta 2, and the
RMI
> > can have granule size 4KB, 16KB, 64KB, but the RSI is restricted to
granule
> size
> > 4KB.
> >
> > I'm open to suggestion on best way to move forward.
> 
> The best approach probably depends on whether the 4 KiB restriction is
> likely to be lifted in a future version of the CCA architecture, and I
don't have
> any insight into that.
> 
> If it is likely to be lifted, then doing the initial implementation to
support
> larger page sizes probably makes sense (which is what you've done here).
> It's less work than going back and adding later. But the commit message
> and/or code comments should indicate that the larger page size support
> is future-proofing work, so that someone doesn't get the wrong idea that
> it should work with larger page sizes now.
> 
> The alternate approach is to not do any larger page size support now,
> and to explicitly state that the code is assuming the current restriction
> of 4 KiB page size only.
> 
> Whichever approach is chosen should be used consistently so there's
> not a mishmash.

I talked with some people from ARM. My current understanding is that the
4KB granule size for the RSI does not mean the guest is restricted to 4KB
page size. The granule size is just the alignment requirement and larger
page sizes will always be 4KB aligned.

I tested 64KB page size on CCA Realm and it booted successfully.

I will be treating large page sizes as a valid scenario. Please flag any
issues you spot related to page size > 4KB.

Regards,
Kameron


  reply	other threads:[~2026-07-21 18:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 17:34 [PATCH v2 0/6] arm64: hyperv: Add Realm support for Hyper-V Kameron Carr
2026-06-25 17:34 ` [PATCH v2 1/6] arm64: rsi: Add RSI host call structure and helper function Kameron Carr
2026-06-25 17:34 ` [PATCH v2 2/6] firmware: smccc: Detect hypervisor via RSI host call in CCA Realms Kameron Carr
2026-06-25 17:54   ` sashiko-bot
2026-06-25 17:34 ` [PATCH v2 3/6] arm64: hyperv: Add per-CPU RSI host call infrastructure for " Kameron Carr
2026-06-25 17:49   ` sashiko-bot
2026-06-25 18:58   ` Michael Kelley
2026-06-25 17:34 ` [PATCH v2 4/6] Drivers: hv: Mark shared memory as decrypted " Kameron Carr
2026-06-25 17:50   ` sashiko-bot
2026-06-25 18:58   ` Michael Kelley
2026-06-26 11:08     ` Kameron Carr
2026-06-26 15:04       ` Michael Kelley
2026-07-21 18:43         ` Kameron Carr [this message]
2026-06-25 17:34 ` [PATCH v2 5/6] arm64: hyperv: Route hypercalls through RSI host call in " Kameron Carr
2026-06-25 17:50   ` sashiko-bot
2026-06-25 17:35 ` [PATCH v2 6/6] arm64: hyperv: Implement hv_is_isolation_supported() for " Kameron Carr

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='000c01dd1940$e3e267d0$aba73770$@linux.microsoft.com' \
    --to=kameroncarr@linux.microsoft.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhklinux@outlook.com \
    --cc=sudeep.holla@kernel.org \
    --cc=thuth@redhat.com \
    --cc=wei.liu@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 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.