kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] kvmtool: Limit IPA space to what is actually required
@ 2021-08-22 15:25 Marc Zyngier
  2021-08-22 15:25 ` [PATCH v2 1/3] kvmtool: Abstract KVM_VM_TYPE into a weak function Marc Zyngier
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Marc Zyngier @ 2021-08-22 15:25 UTC (permalink / raw)
  To: kvmarm; +Cc: Andre Przywara, kernel-team, Will Deacon

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(-)

-- 
2.30.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-08-31 15:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-22 15:25 [PATCH v2 0/3] kvmtool: Limit IPA space to what is actually required Marc Zyngier
2021-08-22 15:25 ` [PATCH v2 1/3] kvmtool: Abstract KVM_VM_TYPE into a weak function Marc Zyngier
2021-08-22 19:58   ` Oliver Upton
2021-08-22 15:25 ` [PATCH v2 2/3] kvmtool: arm64: Use the maximum supported IPA size when creating the VM Marc Zyngier
2021-08-22 20:03   ` Oliver Upton
2021-08-24  0:46   ` Andre Przywara
2021-08-22 15:25 ` [PATCH v2 3/3] kvmtool: arm64: Configure VM with the minimal required IPA space Marc Zyngier
2021-08-22 20:05   ` Oliver Upton
2021-08-23  9:36     ` Marc Zyngier
2021-08-23  9:43       ` Oliver Upton
2021-08-24  0:47   ` Andre Przywara
2021-08-26 11:11     ` Marc Zyngier
2021-08-31 15:05 ` [PATCH v2 0/3] kvmtool: Limit IPA space to what is actually required Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).