From: Steven Price <steven.price@arm.com>
To: Fuad Tabba <tabba@google.com>
Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Marc Zyngier <maz@kernel.org>, Will Deacon <will@kernel.org>,
James Morse <james.morse@arm.com>,
Oliver Upton <oliver.upton@linux.dev>,
Zenghui Yu <yuzenghui@huawei.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Joey Gouly <joey.gouly@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Christoffer Dall <christoffer.dall@arm.com>,
linux-coco@lists.linux.dev,
Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>,
Gavin Shan <gshan@redhat.com>,
Shanker Donthineni <sdonthineni@nvidia.com>,
Alper Gun <alpergun@google.com>,
"Aneesh Kumar K . V" <aneesh.kumar@kernel.org>,
Emi Kisanuki <fj0570is@fujitsu.com>,
Vishal Annapurve <vannapurve@google.com>,
WeiLin.Chang@arm.com, Lorenzo Pieralisi <lpieralisi@kernel.org>,
Kohei Enju <enju.kohei@fujitsu.com>
Subject: Re: [PATCH v3 07/11] KVM: Allow architectures to reject memslot changes before invalidation
Date: Wed, 18 Nov 2026 16:44:11 +0000 [thread overview]
Message-ID: <ac61e062-6d33-4166-8ecc-a9648bbffc5b@arm.com> (raw)
In-Reply-To: <CA+EHjTwqYUBvhjF8dxqVA1mF_Qe1r2UZdwkZ+Zirgmm2um=skg@mail.gmail.com>
On 17/11/2026 14:31, Fuad Tabba wrote:
> Hi Suzuki,
>
> On Mon, 16 Nov 2026 16:43:53 +0000, Steven Price <steven.price@arm.com> wrote:
> [...]
>> Architectures may need to reject deletion of a memory slot without
>> changing the guest's memory mappings. Currently, KVM invalidates the slot
>> and calls kvm_arch_flush_shadow_memslot() before
>> kvm_arch_prepare_memory_region() can reject the request. On arm64, this
>> unmaps the slot from stage-2. Restoring the old memslot on failure does not
>> restore those mappings, so even a rejected deletion has side effects.
> [...]
>> Move arm64's protected VM checks into the new hook so that unsupported
>> deletions and moves are rejected before stage-2 unmapping. Keep resource
>> preparation after invalidation, since invalidation drops slots_arch_lock
>> and allows concurrent updates to architecture-specific memslot metadata.
>
> For pVMs the invalidation doesn't touch stage-2
> (protected_pkvm_vm_s2_ops uses no_stage2_unmap_range()), so the reason
> for the hook is the Realm case in the next patch. Can you change the
> message to say that?
Yes I'll clarify that.
Thanks,
Steve
next prev parent reply other threads:[~2026-11-18 16:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 16:43 [PATCH v3 00/11] KVM: arm64: CCA: Prepare Realm memory management Steven Price
2026-11-16 16:43 ` [PATCH v3 01/11] KVM: arm64: guest_memfd: Check mmap support when preparing memslot Steven Price
2026-11-17 14:05 ` Fuad Tabba
2026-11-18 10:34 ` Suzuki K Poulose
2026-11-18 11:14 ` Steven Price
2026-11-18 12:04 ` Suzuki K Poulose
2026-11-18 15:18 ` Steven Price
2026-11-16 16:43 ` [PATCH v3 02/11] KVM: arm64: CCA: Introduce Realms Steven Price
2026-11-17 14:07 ` Fuad Tabba
2026-11-18 16:12 ` Steven Price
2026-11-16 16:43 ` [PATCH v3 03/11] KVM: arm64: Handle attributes in stage2_unmap_range Steven Price
2026-11-17 14:16 ` Fuad Tabba
2026-11-18 16:12 ` Steven Price
2026-11-16 16:43 ` [PATCH v3 04/11] KVM: arm64: CCA: Add basic infrastructure for creating a realm Steven Price
2026-11-16 16:43 ` [PATCH v3 05/11] KVM: arm64: CCA: Tear down RTTs Steven Price
2026-11-16 16:43 ` [PATCH v3 06/11] KVM: arm64: CCA: Add Realm RTT mapping and invalidation helpers Steven Price
2026-11-16 16:43 ` [PATCH v3 07/11] KVM: Allow architectures to reject memslot changes before invalidation Steven Price
2026-11-17 14:31 ` Fuad Tabba
2026-11-18 16:44 ` Steven Price [this message]
2026-11-16 16:43 ` [PATCH v3 08/11] KVM: arm64: CCA: Prevent memslot modifications after Realm creation Steven Price
2026-11-17 14:42 ` Fuad Tabba
2026-11-18 16:49 ` Steven Price
2026-11-16 16:43 ` [PATCH v3 09/11] KVM: arm64: CCA: Support runtime faulting of memory Steven Price
2026-11-16 16:43 ` [PATCH v3 10/11] KVM: arm64: Dispatch stage-2 destruction by VM flavor Steven Price
2026-11-17 15:02 ` Fuad Tabba
2026-11-18 17:04 ` Steven Price
2026-11-16 16:43 ` [PATCH v3 11/11] KVM: arm64: CCA: Add Realm stage-2 MMU operations Steven Price
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=ac61e062-6d33-4166-8ecc-a9648bbffc5b@arm.com \
--to=steven.price@arm.com \
--cc=WeiLin.Chang@arm.com \
--cc=alexandru.elisei@arm.com \
--cc=alpergun@google.com \
--cc=aneesh.kumar@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@arm.com \
--cc=enju.kohei@fujitsu.com \
--cc=fj0570is@fujitsu.com \
--cc=gankulkarni@os.amperecomputing.com \
--cc=gshan@redhat.com \
--cc=james.morse@arm.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-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=sdonthineni@nvidia.com \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=vannapurve@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®