KVM: SEV: Drop user-triggerable WARN clean up REG_REGION
Status from this message: Applied to kvm-x86 svm. Like the other large set of SEV fixes, I'll omit this
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGIONarch/ | +7 | 0 replies | |
| 2/5 | KVM: SEV: Drop useless sanity checks in sev_mem_enc_register_region()arch/ | +0 | 0 replies | |
| 3/5 | KVM: SEV: Disallow pinning more pages than exist in the systemarch/ | +9 | 0 replies | |
| 4/5 | KVM: SEV: Use PFN_DOWN() to simplify "number of pages" math when pinning memoryarch/ | +2 | 0 replies | |
| 5/5 | KVM: SEV: Use kvzalloc_objs() when pinning userpagesarch/ | +9 | 0 replies |
Reviews trailers per patch
None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Liam Merwick |
|---|---|
| Series | R-b T-b |
| 1/5 | |
| 2/5 | |
| 3/5 | |
| 4/5 | |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/5] KVM: SEV: Drop user-triggerable WARN clean up REG_REGION
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+.
Liam, I Cc'd you specifically because it looks like Oracle supports SEV VMs with more than 1TiB of _total_ memory. I assume that's spread across multiple memslots and thus multiple KVM_MEMORY_ENCRYPT_REG_REGION calls, but I wanted to double check before potentially breaking userspace.
Sean Christopherson (5):
KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION
KVM: SEV: Drop useless sanity checks in sev_mem_enc_register_region()
KVM: SEV: Disallow pinning more pages than exist in the system
KVM: SEV: Use PFN_DOWN() to simplify "number of pages" math when
pinning memory
KVM: SEV: Use kvzalloc_objs() when pinning userpages
arch/x86/kvm/svm/sev.c | 51 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 26 deletions(-)
base-commit: bfd7f4adc1230373c25e1b787a6f1ee407eb0656
Signature · 1 line
2.53.0.851.ga537e3e6e9-goog