All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: kvm-devel <kvm@vger.kernel.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Android Kernel Team <kernel-team@android.com>,
	kvmarm <kvmarm@lists.cs.columbia.edu>
Subject: Re: [PATCH 3/3] docs/system/arm/virt: Fix documentation for the 'highmem' option
Date: Wed, 08 Sep 2021 10:16:47 +0100	[thread overview]
Message-ID: <877dfrctq8.wl-maz@kernel.org> (raw)
In-Reply-To: <CAFEAcA_MRyd2AcgAhvEwJY8LGbHoyz_JgTdMGAEtGegvZB0d7A@mail.gmail.com>

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.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Andrew Jones <drjones@redhat.com>,
	Eric Auger <eric.auger@redhat.com>,
	kvmarm <kvmarm@lists.cs.columbia.edu>,
	kvm-devel <kvm@vger.kernel.org>,
	Android Kernel Team <kernel-team@android.com>
Subject: Re: [PATCH 3/3] docs/system/arm/virt: Fix documentation for the 'highmem' option
Date: Wed, 08 Sep 2021 10:16:47 +0100	[thread overview]
Message-ID: <877dfrctq8.wl-maz@kernel.org> (raw)
In-Reply-To: <CAFEAcA_MRyd2AcgAhvEwJY8LGbHoyz_JgTdMGAEtGegvZB0d7A@mail.gmail.com>

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.

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Andrew Jones <drjones@redhat.com>,
	kvm-devel <kvm@vger.kernel.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Eric Auger <eric.auger@redhat.com>,
	Android Kernel Team <kernel-team@android.com>,
	kvmarm <kvmarm@lists.cs.columbia.edu>
Subject: Re: [PATCH 3/3] docs/system/arm/virt: Fix documentation for the 'highmem' option
Date: Wed, 08 Sep 2021 10:16:47 +0100	[thread overview]
Message-ID: <877dfrctq8.wl-maz@kernel.org> (raw)
In-Reply-To: <CAFEAcA_MRyd2AcgAhvEwJY8LGbHoyz_JgTdMGAEtGegvZB0d7A@mail.gmail.com>

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.


  reply	other threads:[~2021-09-08  9:16 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 14:44 [PATCH 0/3] target/arm: Reduced-IPA space and highmem=off fixes Marc Zyngier
2021-08-22 14:44 ` Marc Zyngier
2021-08-22 14:44 ` Marc Zyngier
2021-08-22 14:44 ` [PATCH 1/3] hw/arm/virt: KVM: Probe for KVM_CAP_ARM_VM_IPA_SIZE when creating scratch VM Marc Zyngier
2021-08-22 14:44   ` Marc Zyngier
2021-08-22 14:44   ` Marc Zyngier
2021-08-23  9:07   ` Andrew Jones
2021-08-23  9:07     ` Andrew Jones
2021-08-23  9:07     ` Andrew Jones
2021-09-08  7:16   ` Eric Auger
2021-09-08  7:16     ` Eric Auger
2021-09-08  7:16     ` Eric Auger
2021-08-22 14:44 ` [PATCH 2/3] hw/arm/virt: Honor highmem setting when computing highest_gpa Marc Zyngier
2021-08-22 14:44   ` Marc Zyngier
2021-08-22 14:44   ` Marc Zyngier
2021-09-07 12:58   ` Peter Maydell
2021-09-07 12:58     ` Peter Maydell
2021-09-07 12:58     ` Peter Maydell
2021-09-08  7:16     ` Eric Auger
2021-09-08  7:16       ` Eric Auger
2021-09-08  7:16       ` Eric Auger
2021-08-22 14:44 ` [PATCH 3/3] docs/system/arm/virt: Fix documentation for the 'highmem' option Marc Zyngier
2021-08-22 14:44   ` Marc Zyngier
2021-08-22 14:44   ` Marc Zyngier
2021-09-07 12:51   ` Peter Maydell
2021-09-07 12:51     ` Peter Maydell
2021-09-07 12:51     ` Peter Maydell
2021-09-07 17:09     ` Marc Zyngier
2021-09-07 17:09       ` Marc Zyngier
2021-09-07 17:09       ` Marc Zyngier
2021-09-07 18:25       ` Peter Maydell
2021-09-07 18:25         ` Peter Maydell
2021-09-07 18:25         ` Peter Maydell
2021-09-08  9:16         ` Marc Zyngier [this message]
2021-09-08  9:16           ` Marc Zyngier
2021-09-08  9:16           ` Marc Zyngier
2021-09-08  8:53     ` Eric Auger
2021-09-08  8:53       ` Eric Auger
2021-09-08  8:53       ` Eric Auger
2021-08-22 14:48 ` [PATCH 0/3] target/arm: Reduced-IPA space and highmem=off fixes Marc Zyngier
2021-08-22 14:48   ` Marc Zyngier
2021-08-22 14:48   ` Marc Zyngier
2021-09-07 12:52 ` Peter Maydell
2021-09-07 12:52   ` Peter Maydell
2021-09-07 12:52   ` Peter Maydell

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=877dfrctq8.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=kernel-team@android.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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.