Skip to content

Get rid of kernel memory allocation

Glauber Costa kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12start removing kernel memory functionslibkvm/kvm-common.h libkvm/libkvm-ia64.c libkvm/libkvm-powerpc.c +3 more+5 -1610 replies
2/12remove tests of user memory from vl.cqemu/vl.c+5 -140 replies
3/12coalesce memory allocationqemu/vl.c+8 -110 replies
4/12remove KVM_CAP_USER_MEMORY reference from qemu-kvm.cqemu/qemu-kvm.c+21 -310 replies
5/12remove KVM_CAP_USER_MEMORY from libkvm.c.libkvm/libkvm.c+0 -180 replies
6/12remove create_kernel_phys_memlibkvm/kvm-common.h libkvm/libkvm-ia64.c libkvm/libkvm-powerpc.c +3 more+3 -670 replies
7/12get rid of kvm_create_userspace_phys_memlibkvm/libkvm.c+4 -110 replies
8/12remove user_alloc field from slot representationlibkvm/kvm-common.h libkvm/libkvm.c+16 -250 replies
9/12merge destroy phys mem functionslibkvm/libkvm.c+17 -280 replies
10/12rename kvm_register_userspace_phys_memlibkvm/libkvm.c libkvm/libkvm.h qemu/qemu-kvm.c+4 -40 replies
11/12remove kernel memory code from hw/pc.cqemu/hw/pc.c+2 -170 replies
12/12remove kernel memory allocation code from ipf.cqemu/hw/ipf.c+6 -210 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/12] Get rid of kernel memory allocation

Hey guys,

Some eons before the dinosaurs went extinct, we used to support a method of memory allocation different than the one advertised by KVM_CAP_USER_MEMORY.

This series of patches attempt on removing the support for it in kvm-userspace entirely. It will make the job of integrating kvm and qemu much easier. As a matter of fact, platforms other than x86 (and ia64, because it seems to borrow a great deal of code from x86) don't even support that method.

I remind you that for those who still want to run userspaces old enough for Hypervisors that lack user memory capability, you always have the option of running an old enough userspace, so to match.

This patch series leaves one test for this capability in place, at machine
initialization: KVM will refuse to run if it's not in there. Later on, if we deprecate the capability altogether from the kernel, we may do it through an ABI check. But for now, I think this is enough.

series stat:

Glauber Costa (12):
start removing kernel memory functions remove tests of user memory from vl.c coalesce memory allocation
remove KVM_CAP_USER_MEMORY reference from qemu-kvm.c remove KVM_CAP_USER_MEMORY from libkvm.c. remove create_kernel_phys_mem
get rid of kvm_create_userspace_phys_mem remove user_alloc field from slot representation merge destroy phys mem functions
rename kvm_register_userspace_phys_mem remove kernel memory code from hw/pc.c remove kernel memory allocation code from ipf.c

 libkvm/kvm-common.h     |    8 +--
 libkvm/libkvm-ia64.c    |   31 ----------
 libkvm/libkvm-powerpc.c |   21 -------
 libkvm/libkvm-s390.c    |   21 -------
 libkvm/libkvm-x86.c     |  124 ----------------------------------------
 libkvm/libkvm.c         |  146 ++++++++++++++---------------------------------
 libkvm/libkvm.h         |    2 +-
 qemu/hw/ipf.c           |   25 ++-------
 qemu/hw/pc.c            |   19 +------
 qemu/qemu-kvm.c         |   52 +++++++----------
 qemu/vl.c               |   26 ++------
 11 files changed, 79 insertions(+), 396 deletions(-)