From: David Vrabel <david.vrabel@citrix.com>
To: "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
george.dunlap@eu.citrix.com, tim@xen.org,
"Mukesh Rathor" <mukesh.rathor@oracle.com>,
jbeulich@suse.com
Cc: xen-devel@lists.xenproject.org,
Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: Is: PVH - how to solve maxmem != memory scenario? Was:Re: [PATCH] libxl: create PVH guests with max memory assigned
Date: Tue, 5 Aug 2014 16:05:28 +0100 [thread overview]
Message-ID: <53E0F2B8.7040302@citrix.com> (raw)
In-Reply-To: <20140805141844.GG13057@laptop.dumpdata.com>
On 05/08/14 15:18, Konrad Rzeszutek Wilk wrote:
> On Tue, Aug 05, 2014 at 01:08:22PM +0200, Roger Pau Monné wrote:
>> On 05/08/14 11:34, David Vrabel wrote:
>>>
>>> I now regret accepting the PVH support in Linux without a clear
>>> specification of what PVH actually is.
>
> It is evolving :-)
I don't think this is a valid excuse for not having documentation.
> My personal opinion is that the easiest path is the best.
> If it is just the matter of making Xen's P2M and E820 be exactly
> the same and let the Linux guest figure out based on 'nr_pages'
> how many RAM pages are really provided), is the way, then
> lets do it that way.
Here's a rough design for two different options that I think would be
sensible.
[Note: hypercalls are from memory and may be wrong, I also can't
remember whether PVH guests get a start_info page and the existing docs
don't say.]
The first is the PV-like approach.
The toolstack shall construct an e820 memory map including all
appropriate holes for MMIO regions. This memory map will be well
ordered, no regions shall overlap and all regions shall begin and end
on page boundaries.
The toolstack shall issue a XENMEM_set_memory_map hypercall for this
memory map.
The toolstack shall issue a XENMEM_set_maximum_reservation hypercall.
Xen (or toolstack via populate_physmap? I can't remember) shall
populate the guest's p2m using the provided e820 map. Frames shall
be added starting from the first E820_RAM region, fully
populating each RAM region before moving onto the next, until the
initial number of pages is reached.
Xen shall write this initial number of pages into the nr_pages field
of the start_info frame.
The guest shall issue a XENMEM_memory_map hypercall to obtain the
e820 memory map (as set by the toolstack).
The guest shall obtain the initial number of pages from
start_info->nr_pages.
The guest may then iterate over the e820 map, adding (sub) RAM
regions that are unpopulated to the balloon driver (or similar).
This second one uses PoD, but we can require specific behaviour on the
guest to ensure the PoD pool (cache) is large enough.
The toolstack shall construct an e820 memory map including all
appropriate holes for MMIO regions. This memory map will be well
ordered, no regions shall overlap and all regions shall begin and end
on page boundaries.
The toolstack shall issue a XENMEM_set_memory_map hypercall for this
memory map.
The toolstack shall issue a XENMEM_set_maximum_reservation hypercall.
Xen shall initialize and fill the PoD cache to the initial number of
pages.
Xen (toolstack?) shall write the initial number of pages into the
nr_pages field of the start_info frame.
The guest shall issue a XENMEM_memory_map hypercall to obtain the
e820 memory map (as set by the toolstack).
The guest shall obtain the initial number of pages from
start_info->nr_pages.
The guest may then iterate over the e820 map, adding (sub) RAM
regions that are unpopulated to the balloon driver (or similar).
Xen must not use the PoD pool for allocations outside the initial
regions. Xen must inject a fault into the guest should it attempt to
access frames outside of the initial region without an appropriate
XENMEM_populate_physmap hypercall to mark the region as populated (or
it could inject a fault/kill the domain if it runs out of PoD pool for
the initial allocation).
>From the guest's point-of-view both approaches are the same. PoD could
allow for deferred allocation which might help with start-up times for
large guests, if that's something that interests people.
David
next prev parent reply other threads:[~2014-08-05 15:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 11:02 [PATCH] libxl: create PVH guests with max memory assigned Roger Pau Monne
2014-07-18 16:49 ` Konrad Rzeszutek Wilk
2014-07-18 17:00 ` Roger Pau Monné
2014-07-18 17:11 ` Andrew Cooper
2014-07-21 10:16 ` Ian Campbell
2014-07-18 20:53 ` Konrad Rzeszutek Wilk
2014-08-05 8:57 ` Ian Campbell
2014-07-18 17:19 ` Olaf Hering
2014-07-18 19:33 ` Konrad Rzeszutek Wilk
2014-08-01 15:34 ` Roger Pau Monné
2014-08-04 18:44 ` Konrad Rzeszutek Wilk
2014-08-05 8:55 ` Ian Campbell
2014-08-05 9:34 ` David Vrabel
2014-08-05 11:08 ` Roger Pau Monné
2014-08-05 14:06 ` Ian Campbell
2014-08-05 14:10 ` George Dunlap
2014-08-05 21:22 ` Mukesh Rathor
2014-08-05 14:18 ` Is: PVH - how to solve maxmem != memory scenario? Was:Re: " Konrad Rzeszutek Wilk
2014-08-05 14:36 ` Jan Beulich
2014-08-05 14:48 ` Konrad Rzeszutek Wilk
2014-08-05 15:12 ` Jan Beulich
2014-08-05 15:41 ` Konrad Rzeszutek Wilk
2014-08-05 15:05 ` David Vrabel [this message]
2014-08-05 15:40 ` Konrad Rzeszutek Wilk
2014-08-05 15:51 ` Jan Beulich
2014-08-05 15:56 ` Konrad Rzeszutek Wilk
2014-08-05 16:07 ` Jan Beulich
2014-08-05 19:45 ` Tim Deegan
2014-08-05 21:36 ` Mukesh Rathor
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=53E0F2B8.7040302@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=mukesh.rathor@oracle.com \
--cc=roger.pau@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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.