All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Cc: Andre Przywara <Andre.Przywara@arm.com>,
	Will Deacon <will@kernel.org>,
	Alexandru Elisei <alexandru.elisei@arm.com>
Subject: [PATCH 0/3] kvmtool: Limit IPA space to what is actually required
Date: Tue,  9 Mar 2021 16:39:06 +0000	[thread overview]
Message-ID: <20210309163909.822149-1-maz@kernel.org> (raw)

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
(thanks to a kernel bug), but in general means we don't benefit from
smaller page tables at stage-2.

This series does two 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 all looks really good, except that the last patch trips yet another
bug in KVM so better not apply it. Yet.

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.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-03-09 16:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 16:39 Marc Zyngier [this message]
2021-03-09 16:39 ` [PATCH 1/3] kvmtool: Abstract KVM_VM_TYPE into a weak function Marc Zyngier
2021-03-18 10:20   ` Andre Przywara
2021-03-09 16:39 ` [PATCH 2/3] kvmtool: arm64: Use the maximum supported IPA size when creating the VM Marc Zyngier
2021-03-18 10:21   ` Andre Przywara
2021-03-18 14:06     ` Marc Zyngier
2021-03-09 16:39 ` [PATCH 3/3][Do not merge] kvmtool: arm64: Configure VM with the minimal required IPA space Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210309163909.822149-1-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=Andre.Przywara@arm.com \
    --cc=alexandru.elisei@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.