Skip to content

KVM: x86: VM alloc bug fix and cleanup

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Queued, thanks. Might as well make vm_size a field instead of a pointer

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: x86: Gracefully handle __vmalloc() failure during VM allocationarch/x86/kvm/svm.c arch/x86/kvm/vmx/vmx.c+8 -00 replies
2/3KVM: x86: Directly return __vmalloc() result in ->vm_alloc()arch/x86/kvm/svm.c arch/x86/kvm/vmx/vmx.c+8 -160 replies
3/3KVM: x86: Consolidate VM allocation and free for VMX and SVMarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx/vmx.c +1 more+17 -291 reply

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchVitaly Kuznetsov
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] KVM: x86: VM alloc bug fix and cleanup

Fix a (fairly) long standing NULL pointer dereference if VM allocation fails, and do a bit of clean up on top.

I would have preferred to omit patch 01, i.e. fix the bug via patch 02, but unfortunately (long term support) kernel 4.19 doesn't have the accounting changes, which would make backporting the fix extra annoying for no real benefit.

Sean Christopherson (3):
KVM: x86: Gracefully handle __vmalloc() failure during VM allocation
KVM: x86: Directly return __vmalloc() result in ->vm_alloc()
KVM: x86: Consolidate VM allocation and free for VMX and SVM

 arch/x86/include/asm/kvm_host.h | 12 ++++--------
 arch/x86/kvm/svm.c              | 15 ++++-----------
 arch/x86/kvm/vmx/vmx.c          | 16 ++++------------
 arch/x86/kvm/x86.c              |  7 +++++++
 4 files changed, 19 insertions(+), 31 deletions(-)
Signature · 1 line
2.24.1