public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH RESEND kvmtool 0/4] arm: Payload memory layout change
@ 2024-11-28 15:12 Alexandru Elisei
  2024-11-28 15:12 ` [PATCH kvmtool 1/4] arm: Fix off-by-one errors when computing payload memory layout Alexandru Elisei
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Alexandru Elisei @ 2024-11-28 15:12 UTC (permalink / raw)
  To: will, julien.thierry.kdev, kvm, linux-arm-kernel, kvmarm
  Cc: maz, oliver.upton, apatel, andre.przywara, suzuki.poulose,
	s.abdollahi22

(resending because I accidently only sent the cover letter, sorry for that)

The first 3 patches are fixes to kvm__arch_load_kernel_image(). I've CC'ed
the riscv maintainer because it looks to me like riscv is similarly
affected.

Patch #4 ("arm64: Increase the payload memory region size to 512MB") might
be controversial. Follows a bug report I received from Abdollahi Sina in
private. Details in the commit message, but the gist of the patch is that
the memory region where kernel + initrd + DTB are copied to are changed
from 256MB to 512MB.  As a result, the DTB and initrd are moved from below
ram_start + 256MB to ram_start + 512MB to accomodate a larger initrd.  If
users rely on finding the DTB and initrd at the current addresses, then I'm
not sure the patch is justified - after all, if someone really wants to use
such a large initrd instead of a disk image with virtio, then replacing
SZ_256M with SZ_512M locally doesn't look like a big ask.

On the other hand, if there are no users that rely on the current payload
layout, increasing the memory region size to 512MB to allow for more
unusual use cases, while still maintaining compatibility with older
kernels, doesn't seem unreasonable to me.

Please comment, I don't feel strongly either way - I'll happy drop the last
patch if there are objections.

Alexandru Elisei (4):
  arm: Fix off-by-one errors when computing payload memory layout
  arm: Check return value for host_to_guest_flat()
  arm64: Use the kernel header image_size when loading into memory
  arm64: Increase the payload memory region size to 512MB

 arm/aarch32/include/kvm/kvm-arch.h |  5 +-
 arm/aarch64/include/kvm/kvm-arch.h |  7 ++-
 arm/aarch64/kvm.c                  | 88 +++++++++++++++++++++++-------
 arm/kvm.c                          | 35 +++++++++---
 4 files changed, 105 insertions(+), 30 deletions(-)

-- 
2.47.0



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

end of thread, other threads:[~2024-12-12  9:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-28 15:12 [PATCH RESEND kvmtool 0/4] arm: Payload memory layout change Alexandru Elisei
2024-11-28 15:12 ` [PATCH kvmtool 1/4] arm: Fix off-by-one errors when computing payload memory layout Alexandru Elisei
2024-11-28 15:12 ` [PATCH kvmtool 2/4] arm: Check return value for host_to_guest_flat() Alexandru Elisei
2024-11-28 16:06   ` Andrew Jones
2024-11-28 15:12 ` [PATCH kvmtool 3/4] arm64: Use the kernel header image_size when loading into memory Alexandru Elisei
2024-11-28 15:12 ` [RFC PATCH kvmtool 4/4] arm64: Increase the payload memory region size to 512MB Alexandru Elisei
2024-12-11 22:59 ` [PATCH RESEND kvmtool 0/4] arm: Payload memory layout change Will Deacon
2024-12-11 23:44 ` Will Deacon
2024-12-12  9:41   ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox