Add AMD SEV page encryption bitmap support.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest9 patches 28 repliesIn review
- v19 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Fix in sev_dbg_crypt() to release RCU read lock if hva_to_gfn() fails when bypassing DBG_DECRYPT API calls for unencrypted guest memory.
- Comment fix for Patch 7/9.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | KVM: x86: Add AMD SEV specific Hypercall3arch/ | +12 | 23 replies | |
| 2/9 | KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercallDocumentation/ arch/ arch/ +5 more | +121 | 3 replies | |
| 3/9 | KVM: x86: Introduce KVM_GET_PAGE_ENC_BITMAP ioctlDocumentation/ arch/ arch/ +4 more | +125 | 2 replies | |
| 4/9 | mm: x86: Invoke hypercall when page encryption status is changed.arch/ arch/ arch/ +2 more | +76 | 0 replies | |
| 5/9 | KVM: x86: Introduce KVM_SET_PAGE_ENC_BITMAP ioctlDocumentation/ arch/ arch/ +4 more | +111 | 0 replies | |
| 6/9 | KVM: SVM: Add support for static allocation of unified Page Encryption Bitmap.arch/ arch/ arch/ +2 more | +43 | 0 replies | |
| 7/9 | KVM: x86: Mark _bss_decrypted section variables as decrypted in page encryption bitmap.arch/ arch/ arch/ | +22 | 0 replies | |
| 8/9 | KVM: x86: Add kexec support for SEV page encryption bitmap.arch/ | +28 | 0 replies | |
| 9/9 | KVM: SVM: Bypass DBG_DECRYPT API calls for unecrypted guest memory.arch/ | +76 | 0 replies |
Reviews trailers per patch
5 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Steve Rutherford | Venu Busireddy |
|---|---|---|
| 1/9 | R-b | R-b |
| 2/9 | R-b | |
| 3/9 | R-b | |
| 4/9 | R-b | |
| 5/9 | R-b | |
| 6/9 | ||
| 7/9 | ||
| 8/9 | ||
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/9] Add AMD SEV page encryption bitmap support.
From: Ashish Kalra <[email protected]>
The series add support for AMD SEV page encryption bitmap.
SEV guest VMs have the concept of private and shared memory. Private memory is encrypted with the guest-specific key, while shared memory may be encrypted with hypervisor key. The patch series introduces a new hypercall. The guest OS can use this hypercall to notify the page encryption status.
The patch adds new ioctls KVM_{SET,GET}_PAGE_ENC_BITMAP. The ioctl can be used by qemu to get the page encryption bitmap. Qemu can consult this bitmap during guest live migration / page migration and/or guest debugging to know whether the page is encrypted.
The page encryption bitmap support is required for SEV guest live migration, guest page migration and guest debugging.
The patch-set also adds support for bypassing unencrypted guest memory regions for DBG_DECRYPT API calls, guest memory region encryption status in sev_dbg_decrypt() is now referenced using the page encryption bitmap.
A branch containing these patches is available here:
https://github.com/AMDESE/linux/tree/sev-page-encryption-bitmap-v2
Changes since v1:
- Fix in sev_dbg_crypt() to release RCU read lock if hva_to_gfn() fails when bypassing DBG_DECRYPT API calls for unencrypted guest memory.
- Comment fix for Patch 7/9.
Ashish Kalra (4):
KVM: SVM: Add support for static allocation of unified Page Encryption
Bitmap.
KVM: x86: Mark _bss_decrypted section variables as decrypted in page
encryption bitmap.
KVM: x86: Add kexec support for SEV page encryption bitmap.
KVM: SVM: Bypass DBG_DECRYPT API calls for unecrypted guest memory.
Brijesh Singh (5):
KVM: x86: Add AMD SEV specific Hypercall3
KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercall
KVM: x86: Introduce KVM_GET_PAGE_ENC_BITMAP ioctl
mm: x86: Invoke hypercall when page encryption status is changed.
KVM: x86: Introduce KVM_SET_PAGE_ENC_BITMAP ioctl
Documentation/virt/kvm/api.rst | 71 ++++++ Documentation/virt/kvm/hypercalls.rst | 15 ++ arch/x86/include/asm/kvm_host.h | 7 + arch/x86/include/asm/kvm_para.h | 12 + arch/x86/include/asm/mem_encrypt.h | 4 + arch/x86/include/asm/paravirt.h | 10 + arch/x86/include/asm/paravirt_types.h | 2 + arch/x86/kernel/kvm.c | 28 +++ arch/x86/kernel/kvmclock.c | 12 + arch/x86/kernel/paravirt.c | 1 + arch/x86/kvm/svm/sev.c | 321 ++++++++++++++++++++++++++ arch/x86/kvm/svm/svm.c | 5 + arch/x86/kvm/svm/svm.h | 7 + arch/x86/kvm/vmx/vmx.c | 1 + arch/x86/kvm/x86.c | 35 +++ arch/x86/mm/mem_encrypt.c | 63 ++++- arch/x86/mm/pat/set_memory.c | 7 + include/uapi/linux/kvm.h | 13 ++ include/uapi/linux/kvm_para.h | 1 + 19 files changed, 614 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.1