[PATCH 10/11] KVM: arm64: CCA: Support runtime faulting of memory

Suzuki K Poulose suzuki.poulose at arm.com
Mon Nov 9 06:21:39 PST 2026


On 09/11/2026 13:11, Fuad Tabba wrote:
> Hi Suzuki,
> 
> On Mon, 09 Nov 2026 11:35:31 +0000, Suzuki K Poulose
> <suzuki.poulose at arm.com> wrote:
> [...]
>>> applies as is. Only how the expected state is computed differs: for a
>>> pVM it comes from the per-page share state rather than an IPA bit.
>>
>> When you say, per-page, you mean per-IPA or per "backing page" ? i.e.,
>> can pKVM do something like :
>>
>>      kvm_ipa_is_private(kvm, ipa) ?
>>
>> (similar to Realm) or does it need the struct page backing the "ipa" ?
> 
> Per IPA, so kvm_ipa_is_private(kvm, ipa) would work for pKVM too. A
> pVM's page is private unless the guest has shared it, and that state
> is in its stage-2 PTE at EL2, not in the struct page. The host kernel
> doesn't have a copy today, since EL2 handles the share and unshare
> hypercalls and the new state is only at EL2, so the pKVM side of the
> check, a hypercall or a host-side mirror, is part of pKVM's
> guest_memfd support when that lands.

Perfect, thanks for the clarification. If kvm_ipa_is_private() works for
you, thats good. I was wondering if the host-side mirrors the data
and KVM would only use that (with EL2 enforcing the checks).

I think we could go with that construct and make progress.

Cheers
Suzuki


> 
> Cheers,
> /fuad




More information about the linux-arm-kernel mailing list