Re: [PATCH 0/5] KVM: SEV: Drop user-triggerable WARN clean up REG_REGION
From: Sean Christopherson
Date: Tue Apr 07 2026 - 20:15:49 EST
On Thu, 12 Mar 2026 17:32:57 -0700, Sean Christopherson wrote:
> Drop a WARN in sev_pin_memory() that is comically easy to trigger, and then
> clean up the code a bit.
>
> *** WARNING ***
>
> The last patch impacts KVM's ABI due to a size restriction that's applied to
> kvmalloc() but not vmalloc(). If my math is correct (definitely a big "if),
> it will only impact VMMs that attempt to do KVM_MEMORY_ENCRYPT_REG_REGION with
> a single region of ~1TiB+.
>
> [...]
Applied to kvm-x86 svm. Like the other large set of SEV fixes, I'll omit this
from the pull request if there are any problems.
[1/5] KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION
https://github.com/kvm-x86/linux/commit/8acffeef5ef7
[2/5] KVM: SEV: Drop useless sanity checks in sev_mem_enc_register_region()
https://github.com/kvm-x86/linux/commit/12a8ff869ddc
[3/5] KVM: SEV: Disallow pinning more pages than exist in the system
https://github.com/kvm-x86/linux/commit/6d71f9349d9b
[4/5] KVM: SEV: Use PFN_DOWN() to simplify "number of pages" math when pinning memory
https://github.com/kvm-x86/linux/commit/7ad02ff1e4a4
[5/5] KVM: SEV: Use kvzalloc_objs() when pinning userpages
https://github.com/kvm-x86/linux/commit/a7f53694d591
--
https://github.com/kvm-x86/linux/tree/next