From: "Michael S. Tsirkin" <mst@redhat.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com,
"Stefano Stabellini" <stefano.stabellini@eu.citrix.com>,
qemu-devel@nongnu.org, "Don Slutz" <dslutz@verizon.com>,
"Anthony Liguori" <aliguori@amazon.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH v5 2/3] pc & q35: Add new machine opt max-ram-below-4g
Date: Tue, 17 Jun 2014 23:17:13 +0300 [thread overview]
Message-ID: <20140617201713.GA16416@redhat.com> (raw)
In-Reply-To: <20140617200854.GC27242@laptop.dumpdata.com>
On Tue, Jun 17, 2014 at 04:08:54PM -0400, Konrad Rzeszutek Wilk wrote:
> On Tue, Jun 17, 2014 at 10:43:29PM +0300, Michael S. Tsirkin wrote:
> > On Tue, Jun 17, 2014 at 02:44:41PM -0400, Don Slutz wrote:
> > > On 06/17/14 14:22, Michael S. Tsirkin wrote:
> > > >On Fri, Jun 06, 2014 at 01:52:05PM -0400, Don Slutz wrote:
> > > >>This is a pc & q35 only machine opt. One use is to allow for more
> > > >>ram in a 32bit guest for example:
> > > >>
> > > >>-machine pc,max-ram-below-4g=3.75G
> > > >>
> > > >>If you add enough PCI devices then all mmio for them will not fit
> > > >>below 4G which may not be the layout the user wanted. This allows
> > > >>you to increase the below 4G address space that PCI devices can use
> > > >>(aka decrease ram below 4G) and therefore in more cases not have any
> > > >>mmio that is above 4G.
> > > >>
> > > >>For example using "-machine pc,max-ram-below-4g=2G" on the command
> > > >>line will limit the amount of ram that is below 4G to 2G.
> > > >I'm not sure I get it.
> > > >
> > > >All this only has effect if you have >4G RAM, right?
> > >
> > > Nope. When it takes effect includes RAM > max-ram-below-4g. I.E.
> > >
> > > -machine pc,max-ram-below-4g=2G -m 3G
> > >
> > > Will have 2G in 32bit space (below 4G) and 1G in 64bit space (above 4G).
> > >
> > > >Presumably you then have a 64 bit guest so why does it
> > > >care about memory/MMIO being below 4G?
> > >
> > > It is not the guest that matters, it is all the PCI devices in use. There are
> > > ones (all old hardware) that only support 32bit addresses.
> >
> > Emulated devices? Let's just teach them to support 64 bit BARs.
> > Looks like a nicer solution than asking user to make
> > this decision.
>
> I presume real normal PCI devices.
> >
> > > When using
> > > these you may need more room.
> > >
> > > Also pci-passthru of real hardware that is 32bit only may require this.
> > > -Don Slutz
> >
> > Guest and host BARs are unrelated so it seems we could allow 64 bit BARs
> > even when they are 32 bit on host.
>
> That assumes that the devices are OK with having their BARs remmaped.
> That is not always the case and some of them might not like that.
>
> Also OSes might want to only use 32-bit BARs as that is what they
> had been written for. I presume since Don is working for a telecom
> that this might be some ancient networking hardware with super-fast
> BSD OS.
> >
> > Though PCI Express spec requires 64 bit BARs since version 1.0,
> > are there really many devices like this out there?
> > Care giving examples?
>
> I think he mentioned PCI devices, not PCIe.
OK that's a small niche but it makes some sense.
So let's focus on this case, it can be addressed
cleanly:
default: max-ram-below-4g=4g
pc:
low = MIN(low, max-ram-below-4g)
no special handling for any corner cases.
For bonus points detect and warn if value chosen causes
alignment issues.
--
MST
next prev parent reply other threads:[~2014-06-17 20:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 17:52 [Qemu-devel] [PATCH v5 0/3] Add max-ram-below-4g (was Add pci_hole_min_size machine option) Don Slutz
2014-06-06 17:52 ` [Qemu-devel] [PATCH v5 1/3] xen-hvm: Fix xen_hvm_init() to adjust pc memory layout Don Slutz
2014-06-06 17:52 ` [Qemu-devel] [PATCH v5 2/3] pc & q35: Add new machine opt max-ram-below-4g Don Slutz
2014-06-08 15:40 ` Michael S. Tsirkin
2014-06-09 14:20 ` Don Slutz
2014-06-09 14:38 ` Michael S. Tsirkin
2014-06-09 15:10 ` Marcel Apfelbaum
2014-06-09 15:37 ` Igor Mammedov
2014-06-09 17:33 ` Marcel Apfelbaum
2014-06-09 20:03 ` Don Slutz
2014-06-09 19:13 ` Don Slutz
2014-06-10 7:36 ` Gerd Hoffmann
2014-06-17 17:51 ` Don Slutz
2014-06-18 9:52 ` Gerd Hoffmann
2014-06-17 18:22 ` Michael S. Tsirkin
2014-06-17 18:44 ` Don Slutz
2014-06-17 19:43 ` Michael S. Tsirkin
2014-06-17 20:05 ` Michael S. Tsirkin
2014-06-17 20:08 ` [Qemu-devel] [Xen-devel] " Konrad Rzeszutek Wilk
2014-06-17 20:17 ` Michael S. Tsirkin [this message]
2014-06-18 13:28 ` Slutz, Donald Christopher
2014-06-17 20:35 ` Pasi Kärkkäinen
2014-06-06 17:52 ` [Qemu-devel] [PATCH v5 3/3] xen-hvm: Pass is_default to xen_hvm_init Don Slutz
2014-06-08 15:24 ` Michael S. Tsirkin
2014-06-09 14:25 ` Don Slutz
2014-06-09 14:39 ` Michael S. Tsirkin
2014-06-08 15:42 ` Michael S. Tsirkin
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=20140617201713.GA16416@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=dslutz@verizon.com \
--cc=imammedo@redhat.com \
--cc=konrad.wilk@oracle.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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 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).