KVM: x86: gmem populate fix and cleanups
Status from this message: Applied to kvm-x86 misc, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Changes in v2 from the cover letter
- Rewrite the SNP patch changelog.
- Tweak the code to avoid checking KVM_SEV_SNP_PAGE_TYPE_ZERO twice.
- Drop what is now effectively a sanity check in sev_gmem_post_populate(), so that we don't have to duplicate the logic when in-place conversion comes along.
- Tack on the TDX change.
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | KVM: SEV: Explicitly disallow NULL user address for SNP_LAUNCH_UPDATEarch/ | +5 | 2 replies | |
| 2/2 | KVM: TDX: Return EINVAL, not EOPNOTSUPP, for NULL INIT_MEM_REGION sourcearch/ | +2 | 8 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Yan Zhao | Binbin Wu | Kiryl Shutsemau (Meta) | Ackerley Tng | Xiaoyao Li |
|---|---|---|---|---|---|
| 1/2 | R-b | ||||
| 2/2 | R-b T-b | R-b | A-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v2 0/2] KVM: x86: gmem populate fix and cleanups
Fix a user-triggerable WARN due to KVM not pre-checking that userspace provided a source page for non-ZERO pages for SNP_LAUNCH_UPDATE, and then clean up the equivalent TDX code to also explicitly check the incoming source page *before* calling into guest_memfd, and to return -EINVAL, not -EOPNOTSUPP.
v2:
- Rewrite the SNP patch changelog.
- Tweak the code to avoid checking KVM_SEV_SNP_PAGE_TYPE_ZERO twice.
- Drop what is now effectively a sanity check in sev_gmem_post_populate(), so that we don't have to duplicate the logic when in-place conversion comes along.
- Tack on the TDX change.
v1: https://lore.kernel.org/all/[email protected]
Joerg Roedel (1):
KVM: SEV: Explicitly disallow NULL user address for SNP_LAUNCH_UPDATE
Sean Christopherson (1):
KVM: TDX: Return EINVAL, not EOPNOTSUPP, for NULL INIT_MEM_REGION
source
arch/x86/kvm/svm/sev.c | 11 +++++------ arch/x86/kvm/vmx/tdx.c | 7 ++----- 2 files changed, 7 insertions(+), 11 deletions(-)
base-commit: a204badd8432f93b7e862e7dac6db0fe3d65f370
Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog