Skip to content

kvmtool: Limit IPA space to what is actually required

Marc Zyngier kvmarm 2 versions – Applied

Status from this message: Applied to kvmtool (master), thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 9 repliesApplied
  2. v13 patches 3 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3kvmtool: Abstract KVM_VM_TYPE into a weak functioninclude/kvm/kvm.h kvm.c+7 -11 reply
2/3kvmtool: arm64: Use the maximum supported IPA size when creating the VMarm/aarch64/include/kvm/kvm-arch.h arm/aarch64/kvm.c+31 -32 replies
3/3kvmtool: arm64: Configure VM with the minimal required IPA spacearm/aarch64/kvm.c+19 -15 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAndre PrzywaraOliver Upton
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/3] kvmtool: Limit IPA space to what is actually required

KVM hacking on the Apple M1 SoC has shown that kvmtool (and other VMMs) make pretty poor use of the IPA space parameter (read: do not use it and just pass 0). This results in a guest that cannot boot (recent kernels will just send the VMM packing), and in general means we don't benefit from smaller page tables at stage-2.

This series does three things:
- It switches kvmtool away from the default 40bit, allowing large VMs to be created (I have booted a 4TB VM)
- It reduces the requested IPA space to be as small as possible
- It tells the user why the VM cannot boot when the IPA space required exceeds that of the HW

With these changes, kvmtool is able to spawn a VM on IPA-challenged systems such the Apple M1.

* From v1:
- Use KVM_VM_TYPE_ARM_IPA_SIZE()
- Rebased on a recent HEAD

Marc Zyngier (3):
kvmtool: Abstract KVM_VM_TYPE into a weak function
kvmtool: arm64: Use the maximum supported IPA size when creating the
VM
kvmtool: arm64: Configure VM with the minimal required IPA space

 arm/aarch64/include/kvm/kvm-arch.h | 19 ++++++++++++++---
 arm/aarch64/kvm.c                  | 33 ++++++++++++++++++++++++++++++
 include/kvm/kvm.h                  |  1 +
 kvm.c                              |  7 ++++++-
 4 files changed, 56 insertions(+), 4 deletions(-)
Signature · 6 lines
2.30.2

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm