All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Gordan Bobic <gordan@bobich.net>
Cc: xen-devel@lists.xen.org
Subject: Re: Bug: Limitation of <=2GB RAM in domU persists with 4.3.0
Date: Tue, 3 Sep 2013 10:59:34 -0400	[thread overview]
Message-ID: <20130903145934.GC1487@konrad-lan.dumpdata.com> (raw)
In-Reply-To: <d9c2d7d24e6273e1a388dd4d2d50122e@mail.shatteredsilicon.net>

On Tue, Sep 03, 2013 at 02:53:06PM +0100, Gordan Bobic wrote:
> On Mon, 29 Jul 2013 14:04:31 -0400, Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
> 
> Hi Konrad,
> 
> Apologies it took me a month to get back to this.

Hey Gordan,

That is OK. Time flies fast!
> 
> >>2) Further, I'm finding myself motivated to write that
> >>auto-set (as opposed to hard coded) vBAR=pBAR patch discussed
> >>briefly a week or so ago (have an init script read the BAR
> >>info from dom0 and put it in xenstore, plus a patch to
> >>make pBAR=vBAR reservations built dynamically rather than
> >>statically, based on this data. Now, I'm quite fluent in C,
> >>but my familiarity with Xen soruce code is nearly non-existant
> >>(limited to studying an old unsupported patch every now and then
> >>in order to make it apply to a more recent code release).
> >>Can anyone help me out with a high level view WRT where
> >>this would be best plumbed in (which files and the flow of
> >>control between the affected files)?
> >
> >hvmloader probably and the libxl e820 code. What from a
> >high view needs to happen is that:
> > 1). Need to relax the check in libxl for e820_hole
> >    to also do it for HVM guests. Said code just iterates over the
> >    host E820 and sanitizes it a bit and makes a E820 hypercall to
> >    set it for the guest.
> 
> I'm looking at the libxl code at the moment.
> 
> In cases where e820_host is seen as PV specific, would the
> correct thing to do be to move it out of the PV/HVM specific
> blocks so it applies to both?

Yes.
> 
> In libxl/libxl_x86.c/libxl__e820_alloc
> 
> I have thus far changed the code to remove the PV check,
> and having moved e820_host option to be common to both VM
> types, I changed the 820 related instances from
> b_info->u.pv.e820_host
> to
> b_info->e820_host
> 
> Is this the correct/preferred way this should be handled?

Yes.
> Or would it be better to make e820_host be in both PV and
> HVM options, and refer to it as such
> (u.pv.e820_host / u.hvm.e820_host) ?

No. Lets make it work across the board.
> 
> The e820 sanitizer is called with b_info->u.pv.slack_memkb
> parameter. What does parameter actually mean? I googled
> it and couldn't find any documentation specific to it, and
> it doesn't appear to be documented as settable in the config
> file. What would the equivalent be in case of HVM?

0.

If my memory serves me right it is  some amount of memory that
a PV guests that it does not use normally. It is used by the
frontend and backend driver to communicate. Kind of like a shadow
memory. But only ancient kernels use it but those still have to be
supported.
> 
> > 2). Figure out whether the E820 hypercall (which sets the E820
> >    layout for a guest) can be run on HVM guests. I think it
> >    could not and Mukesh in his PVH patches posted a patch
> >    to enable that - "..Move e820 fields out of pv_domain struct"
> > 2). Hvmloader should do an E820 get machine memory hypercall
> >   to see if there is anything there. If there is - that means
> >    the toolstack has request a "new" type of E820. Iterate
> >    over the E820 and make it look like that.
> >    You can look in the Linux arch/x86/xen/setup.c to see how
> >    it does that.
> >
> >   The complication there is that hvmloader needs to to fit the
> >   ACPI code (the guest type one) and such.
> >   Presumarily you can just re-use the existing spaces that
> >   the host has marked as E820_RESERVED or E820_ACPI..
> 
> Yup, I get it. Not only that, but it should also ideally (not
> strictly necessary, but it'd be handy) map the IOMEM for devices
> it is passed so that pBAR=vBAR (as opposed to just leaving all
> the host e820 reserved areas well alone - which would work for
> most things).

Yes. That is an extra complication that could be done in subsequent
patches. But in theory if you have the E820 mirrored from the host the
pBAR=vBAR should be easy enough as the values from the host BARs can
easily fit in the E820 gaps.

> 
> >   Then there is the SMBIOS would need to move and the BIOS
> >   might need to be relocated - but I think those are relocatable
> >  in some form.
> 
> OK, I'll look at that once I have a workable patch for the libxl
> part.

Aye.
> 
> >>The added bonus of this (if it can be made to work) is that
> >>it might just make unmodified GeForce cards work, too,
> >>which probably makes it worthwhile on it's own.
> >
> >Well, I am more than happy to help you with this.
> 
> Thanks, much appreciated. :)

Yeeey! Vict^H^H^H^volunteer :-)! <manically laughter in the background>

I am also reachable on IRC (FreeNode mostly) as either darnok or konrad
if that would be more convient to discuss this.
> 
> Gordan

  reply	other threads:[~2013-09-03 14:59 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 22:34 Bug: Limitation of <=2GB RAM in domU persists with 4.3.0 Gordan Bobic
2013-07-24 14:08 ` Konrad Rzeszutek Wilk
2013-07-24 14:17   ` Gordan Bobic
2013-07-24 16:06     ` Konrad Rzeszutek Wilk
2013-07-24 16:14       ` Gordan Bobic
2013-07-24 16:31         ` Konrad Rzeszutek Wilk
2013-07-24 17:26           ` Gordan Bobic
2013-07-24 22:15           ` Gordan Bobic
2013-07-25 19:18             ` George Dunlap
2013-07-25 21:48               ` Gordan Bobic
2013-07-25 22:23                 ` Gordan Bobic
2013-07-26  0:21                   ` Ian Campbell
2013-07-26  1:15                     ` Andrew Bobulsky
2013-07-26  9:28                       ` Gordan Bobic
2013-07-26 13:11                         ` Gordan Bobic
2013-07-31 17:53                           ` George Dunlap
2013-07-31 17:56                             ` Andrew Cooper
2013-07-31 19:36                               ` Gordan Bobic
2013-07-31 19:35                             ` Gordan Bobic
2013-08-01  9:15                               ` George Dunlap
2013-08-01 13:10                                 ` Fabio Fantoni
2013-08-02 14:43                                   ` George Dunlap
2013-07-28 10:26                       ` Konrad Rzeszutek Wilk
2013-07-28 21:24                         ` Gordan Bobic
2013-07-28 23:17                           ` Konrad Rzeszutek Wilk
2013-07-28 23:30                             ` Gordan Bobic
2013-07-29  9:53                             ` Ian Campbell
2013-07-26  9:23                     ` Gordan Bobic
2013-07-29 11:14                       ` Ian Campbell
2013-07-29 18:04                       ` Konrad Rzeszutek Wilk
2013-09-03 13:53                         ` Gordan Bobic
2013-09-03 14:59                           ` Konrad Rzeszutek Wilk [this message]
2013-09-03 19:47                             ` HVM support for e820_host (Was: Bug: Limitation of <=2GB RAM in domU persists with 4.3.0) Gordan Bobic
2013-09-03 20:35                               ` Gordan Bobic
2013-09-03 20:49                                 ` Gordan Bobic
2013-09-03 21:10                                   ` Konrad Rzeszutek Wilk
2013-09-03 21:24                                     ` Gordan Bobic
2013-09-03 21:30                                       ` Konrad Rzeszutek Wilk
2013-09-04  0:18                                         ` Gordan Bobic
2013-09-04 14:08                                           ` Konrad Rzeszutek Wilk
2013-09-04 14:23                                             ` Gordan Bobic
2013-09-04 18:00                                               ` Konrad Rzeszutek Wilk
2013-09-03 21:08                                 ` Konrad Rzeszutek Wilk
2013-09-04  9:21                                   ` Gordan Bobic
2013-09-04 11:01                                   ` Gordan Bobic
2013-09-04 13:11                                     ` Gordan Bobic
2013-09-04 20:18                                       ` Gordan Bobic
2013-09-05  2:04                                       ` Konrad Rzeszutek Wilk
2013-09-05  9:41                                         ` Gordan Bobic
2013-09-05 10:00                                           ` Gordan Bobic
2013-09-05 12:36                                             ` Konrad Rzeszutek Wilk
2013-09-05 10:26                                         ` Gordan Bobic
2013-09-05 12:38                                           ` Konrad Rzeszutek Wilk
2013-09-05 21:13                                         ` Gordan Bobic
2013-09-05 21:29                                           ` Gordan Bobic
2013-09-05 21:46                                             ` Gordan Bobic
2013-09-05 22:23                                           ` Konrad Rzeszutek Wilk
2013-09-05 22:42                                             ` Gordan Bobic
2013-09-06 13:09                                               ` Konrad Rzeszutek Wilk
2013-09-06 14:09                                                 ` Gordan Bobic
2013-09-05 22:45                                             ` Gordan Bobic
2013-09-05 23:01                                               ` Konrad Rzeszutek Wilk
2013-09-06 12:23                                                 ` Gordan Bobic
2013-09-06 13:20                                                   ` Konrad Rzeszutek Wilk
2013-09-06 14:45                                                     ` Gordan Bobic
2013-09-05 22:33                                           ` Gordan Bobic
2013-09-06 13:04                                             ` Konrad Rzeszutek Wilk
2013-09-06 13:34                                               ` Gordan Bobic
2013-09-06 14:32                                                 ` Konrad Rzeszutek Wilk
2013-09-06 16:30                                                   ` Gordan Bobic
2013-09-06 19:54                                                     ` Gordan Bobic
2013-09-10 13:35                                                       ` Konrad Rzeszutek Wilk
2013-09-10 15:04                                                         ` Gordan Bobic
2013-07-25 21:26           ` Bug: Limitation of <=2GB RAM in domU persists with 4.3.0 Gordan Bobic

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=20130903145934.GC1487@konrad-lan.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=gordan@bobich.net \
    --cc=xen-devel@lists.xen.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.