From: "Thomson, Jack" <jackabt.amazon@gmail.com>
To: Vincent Donnefort <vdonnefort@google.com>
Cc: maz@kernel.org, oupton@kernel.org, pbonzini@redhat.com,
joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com,
yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org,
shuah@kernel.org, corbet@lwn.net, vladimir.murzin@arm.com,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
isaku.yamahata@intel.com, Jack Thomson <jackabt@amazon.com>
Subject: Re: [PATCH v5 2/5] KVM: arm64: Add pre_fault_memory implementation
Date: Fri, 21 Aug 2026 15:01:58 +0100 [thread overview]
Message-ID: <6270fea8-aa08-48ca-ab1e-ab0ada105ded@gmail.com> (raw)
In-Reply-To: <amc8zlGxegNKHxIY@google.com>
Hi Vincent,
On 27/07/2026 12:11 pm, Vincent Donnefort wrote:
>> + unsigned long *page_size;
>
> It looks a bit odd in that struct.
>
> Also, transparent_hugepage_adjust() modifies pfn and gfn. So perhaps it'd be
> better to introduce a struct kvm_s2_fault_mapping that can be used to get what
> has actually been mapped in kvm_s2_fault_map()?
>
Yeah that's much nicer I'll do that thanks for the suggestion!
>> + if (vcpu_is_protected(vcpu))
>> + return -EOPNOTSUPP;
>
> It could just call pkvm_mem_abort() when the VM is protected?
>
I see, I don't have a setup to test this properly myself, so at the
moment I left the protected vm's out and don't advertise the capability,
if there's a usecase happy to look at it as a follow-up.
>> + /*
>> + * pKVM stage-2 mappings aren't directly walkable from the host; let
>> + * the fault path handle both new and existing mappings.
>> + */
>
> pKVM has a host interval-tree where we keep track of what has been mapped and at
> what level. This tree is also protected with the mmu_lock.
>
Thanks, that sounds better. I'll have a look at moving to that for v6 then.
--
Thanks,
Jack
next prev parent reply other threads:[~2026-08-21 14:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 16:23 [PATCH v5 0/5] KVM: arm64: Add KVM_PRE_FAULT_MEMORY support Jack Thomson
2026-06-12 16:23 ` [PATCH v5 1/5] KVM: arm64: Pass walk flags to kvm_pgtable_get_leaf() Jack Thomson
2026-06-12 16:23 ` [PATCH v5 2/5] KVM: arm64: Add pre_fault_memory implementation Jack Thomson
2026-07-08 15:25 ` Alexandru Elisei
2026-07-10 16:00 ` Alexandru Elisei
2026-08-21 13:27 ` Thomson, Jack
2026-07-10 16:03 ` Alexandru Elisei
2026-08-03 6:06 ` Aneesh Kumar K.V
2026-08-11 16:03 ` Alexandru Elisei
2026-08-21 14:05 ` Thomson, Jack
2026-08-21 13:52 ` Thomson, Jack
2026-08-25 12:29 ` Alexandru Elisei
2026-08-25 13:04 ` Thomson, Jack
2026-07-27 11:11 ` Vincent Donnefort
2026-08-21 14:01 ` Thomson, Jack [this message]
2026-06-12 16:23 ` [PATCH v5 3/5] KVM: selftests: Enable pre_fault_memory_test for arm64 Jack Thomson
2026-06-12 16:23 ` [PATCH v5 4/5] KVM: selftests: Add option for different backing in pre-fault tests Jack Thomson
2026-06-12 16:23 ` [PATCH v5 5/5] KVM: selftests: Add nested pre-fault test for arm64 Jack Thomson
2026-06-12 16:35 ` sashiko-bot
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=6270fea8-aa08-48ca-ab1e-ab0ada105ded@gmail.com \
--to=jackabt.amazon@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=isaku.yamahata@intel.com \
--cc=jackabt@amazon.com \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=pbonzini@redhat.com \
--cc=seiden@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=vdonnefort@google.com \
--cc=vladimir.murzin@arm.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.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 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.