Re: [PATCH v2] KVM: SEV: drop FOLL_WRITE for encrypted region registration

Sean Christopherson <[email protected]> Fri, 31 Jul 2026 13:10:13 -0700
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
On Wed, 15 Jul 2026 01:36:26 -0500, Pankaj Gupta wrote:
> Commit 7e066cb9b71a ("KVM: SEV: Use long-term pin when registering
> encrypted memory regions") added FOLL_LONGTERM to
> sev_mem_enc_register_region() so anonymous guest RAM is migrated out of
> MIGRATE_CMA/ZONE_MOVABLE before a long term pin. It also kept
> FOLL_WRITE on the pin.
> 
> Combining FOLL_WRITE with FOLL_LONGTERM breaks registration of file-backed
> guest memory, such as virtio-pmem host memory-backend-file mappings
> (MAP_SHARED). GUP rejects long-term writable pins on dirty tracked file
> mappings since:
> 
> [...]

Applied to kvm-x86 svm, thanks!

[1/1] KVM: SEV: drop FOLL_WRITE for encrypted region registration
      https://github.com/kvm-x86/linux/commit/ee1a586dd1fa

--
https://github.com/kvm-x86/linux/tree/next