The documentation for the 'highmem' option indicates that it controls
the placement of both devices and RAM. The actual behaviour of QEMU
seems to be that RAM is allowed to go beyond the 4GiB limit, and
that only devices are constraint by this option.
Align the documentation with the actual behaviour.
Cc: Andrew Jones <drjones@redhat.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
docs/system/arm/virt.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst
index 59acf0eeaf..e206e7565d 100644
--- a/docs/system/arm/virt.rst
+++ b/docs/system/arm/virt.rst
@@ -86,9 +86,9 @@ mte
Arm Memory Tagging Extensions. The default is ``off``.
highmem
- Set ``on``/``off`` to enable/disable placing devices and RAM in physical
- address space above 32 bits. The default is ``on`` for machine types
- later than ``virt-2.12``.
+ Set ``on``/``off`` to enable/disable placing devices in physical address
+ space above 32 bits. RAM in excess of 3GiB will always be placed above
+ 32 bits. The default is ``on`` for machine types later than ``virt-2.12``.
gic-version
Specify the version of the Generic Interrupt Controller (GIC) to provide.
--
2.30.2
On Sun, 22 Aug 2021 at 15:45, Marc Zyngier <maz@kernel.org> wrote: > > The documentation for the 'highmem' option indicates that it controls > the placement of both devices and RAM. The actual behaviour of QEMU > seems to be that RAM is allowed to go beyond the 4GiB limit, and > that only devices are constraint by this option. > > Align the documentation with the actual behaviour. I think it would be better to align the behaviour with the documentation. The intent of 'highmem' is to allow a configuration for use with guests that can't address more than 32 bits (originally, 32-bit guests without LPAE support compiled in). It seems like a bug that we allow the user to specify more RAM than will fit into that 32-bit range. We should instead make QEMU exit with an error if the user tries to specify both highmem=off and a memory size that's too big to fit. thanks -- PMM
Hi Peter, On Tue, 07 Sep 2021 13:51:13 +0100, Peter Maydell <peter.maydell@linaro.org> wrote: > > On Sun, 22 Aug 2021 at 15:45, Marc Zyngier <maz@kernel.org> wrote: > > > > The documentation for the 'highmem' option indicates that it controls > > the placement of both devices and RAM. The actual behaviour of QEMU > > seems to be that RAM is allowed to go beyond the 4GiB limit, and > > that only devices are constraint by this option. > > > > Align the documentation with the actual behaviour. > > I think it would be better to align the behaviour with the documentation. > > The intent of 'highmem' is to allow a configuration for use with guests > that can't address more than 32 bits (originally, 32-bit guests without > LPAE support compiled in). It seems like a bug that we allow the user > to specify more RAM than will fit into that 32-bit range. We should > instead make QEMU exit with an error if the user tries to specify > both highmem=off and a memory size that's too big to fit. I'm happy to address this if you are OK with the change in user visible behaviour. However, I am still struggling with my original goal, which is to allow QEMU to create a usable KVM_based VM on systems with a small IPA space (36 bits on the system I have). What would an acceptable way to convey this to the code that deals with the virt memory map so that it falls back to something that actually works? Thanks, M. -- Without deviation from the norm, progress is not possible.
On Tue, 7 Sept 2021 at 18:10, Marc Zyngier <maz@kernel.org> wrote: > > Hi Peter, > > On Tue, 07 Sep 2021 13:51:13 +0100, > Peter Maydell <peter.maydell@linaro.org> wrote: > > > > On Sun, 22 Aug 2021 at 15:45, Marc Zyngier <maz@kernel.org> wrote: > > > > > > The documentation for the 'highmem' option indicates that it controls > > > the placement of both devices and RAM. The actual behaviour of QEMU > > > seems to be that RAM is allowed to go beyond the 4GiB limit, and > > > that only devices are constraint by this option. > > > > > > Align the documentation with the actual behaviour. > > > > I think it would be better to align the behaviour with the documentation. > > > > The intent of 'highmem' is to allow a configuration for use with guests > > that can't address more than 32 bits (originally, 32-bit guests without > > LPAE support compiled in). It seems like a bug that we allow the user > > to specify more RAM than will fit into that 32-bit range. We should > > instead make QEMU exit with an error if the user tries to specify > > both highmem=off and a memory size that's too big to fit. > > I'm happy to address this if you are OK with the change in user > visible behaviour. > > However, I am still struggling with my original goal, which is to > allow QEMU to create a usable KVM_based VM on systems with a small IPA > space (36 bits on the system I have). What would an acceptable way to > convey this to the code that deals with the virt memory map so that it > falls back to something that actually works? Hmm, so at the moment we can either do "fits in 32 bits" or "assumes at least 40 bits" but not 36 ? thanks -- PMM
On Tue, 07 Sep 2021 19:25:23 +0100, Peter Maydell <peter.maydell@linaro.org> wrote: > > On Tue, 7 Sept 2021 at 18:10, Marc Zyngier <maz@kernel.org> wrote: > > > > Hi Peter, > > > > On Tue, 07 Sep 2021 13:51:13 +0100, > > Peter Maydell <peter.maydell@linaro.org> wrote: > > > > > > On Sun, 22 Aug 2021 at 15:45, Marc Zyngier <maz@kernel.org> wrote: > > > > > > > > The documentation for the 'highmem' option indicates that it controls > > > > the placement of both devices and RAM. The actual behaviour of QEMU > > > > seems to be that RAM is allowed to go beyond the 4GiB limit, and > > > > that only devices are constraint by this option. > > > > > > > > Align the documentation with the actual behaviour. > > > > > > I think it would be better to align the behaviour with the documentation. > > > > > > The intent of 'highmem' is to allow a configuration for use with guests > > > that can't address more than 32 bits (originally, 32-bit guests without > > > LPAE support compiled in). It seems like a bug that we allow the user > > > to specify more RAM than will fit into that 32-bit range. We should > > > instead make QEMU exit with an error if the user tries to specify > > > both highmem=off and a memory size that's too big to fit. > > > > I'm happy to address this if you are OK with the change in user > > visible behaviour. > > > > However, I am still struggling with my original goal, which is to > > allow QEMU to create a usable KVM_based VM on systems with a small IPA > > space (36 bits on the system I have). What would an acceptable way to > > convey this to the code that deals with the virt memory map so that it > > falls back to something that actually works? > > Hmm, so at the moment we can either do "fits in 32 bits" or > "assumes at least 40 bits" but not 36 ? Exactly. I have the gut feeling that we need a 'gpa_bits' option that would limit the guest physical range and generalise highmem. High IO ranges would simply not be available if the GPA range isn't big enough. M. -- Without deviation from the norm, progress is not possible.
Hi, On 9/7/21 2:51 PM, Peter Maydell wrote: > On Sun, 22 Aug 2021 at 15:45, Marc Zyngier <maz@kernel.org> wrote: >> The documentation for the 'highmem' option indicates that it controls >> the placement of both devices and RAM. The actual behaviour of QEMU >> seems to be that RAM is allowed to go beyond the 4GiB limit, and >> that only devices are constraint by this option. >> >> Align the documentation with the actual behaviour. > I think it would be better to align the behaviour with the documentation. > > The intent of 'highmem' is to allow a configuration for use with guests > that can't address more than 32 bits (originally, 32-bit guests without > LPAE support compiled in). It seems like a bug that we allow the user > to specify more RAM than will fit into that 32-bit range. We should > instead make QEMU exit with an error if the user tries to specify > both highmem=off and a memory size that's too big to fit. That's my opinion too Thanks Eric > > thanks > -- PMM >
© 2016 - 2026 Red Hat, Inc.