All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: Juergen Gross <jgross@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH for-4.12 v2 4/7] pvh/dom0: warn when dom0_mem is not set
Date: Thu, 14 Feb 2019 01:09:25 -0700	[thread overview]
Message-ID: <5C65223502000078002168FD@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20190213171351.ts3m54hup2536xgq@mac>

>>> On 13.02.19 at 18:13, <roger.pau@citrix.com> wrote:
> On Wed, Feb 13, 2019 at 09:01:07AM -0700, Jan Beulich wrote:
>> >>> On 11.02.19 at 18:46, <roger.pau@citrix.com> wrote:
>> > There have been several reports of the dom0 builder running out of
>> > memory when building a PVH dom0 without having specified a dom0_mem
>> > value. Print a warning message if dom0_mem is not set when booting in
>> > PVH mode.
>> > 
>> > This is a temporary workaround until accounting for internal memory
>> > required by Xen (ie: paging structures) is improved.
>> > 
>> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> 
>> Acked-by: Jan Beulich <jbeulich@suse.com>
>> 
>> I take it that ...
>> 
>> > --- a/xen/arch/x86/dom0_build.c
>> > +++ b/xen/arch/x86/dom0_build.c
>> > @@ -378,8 +378,18 @@ unsigned long __init dom0_compute_nr_pages(
>> >           * maximum of 128MB.
>> >           */
>> >          if ( !nr_pages )
>> > +        {
>> >              nr_pages = avail - (pv_shim ? pv_shim_mem(avail)
>> >                                   : min(avail / 16, 128UL << (20 - PAGE_SHIFT)));
>> > +            if ( is_hvm_domain(d) )
>> > +                /*
>> > +                 * Temporary workaround message until internal (paging) memory
>> > +                 * accounting required to build a pvh dom0 is improved.
>> > +                 */
>> > +                printk("WARNING: PVH dom0 without dom0_mem set is still unstable. "
>> > +                       "If you get crashes during boot, try adding a dom0_mem parameter\n");
>> > +        }
>> 
>> ... you consider it acceptable for the message to be logged twice
>> in certain cases?
> 
> Right, nr_pages could be set to 0 again if there are 2 iterations of
> the parent for loop, in which case using a boolean would be better. I
> can fix this in the next version.

As "a boolean" I think you can use the already present need_paging
one.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-02-14  8:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 17:46 [PATCH for-4.12 v2 0/7] pvh/dom0/shadow/amd fixes Roger Pau Monne
2019-02-11 17:46 ` [PATCH for-4.12 v2 1/7] dom0/pvh: align allocation and mapping order to start address Roger Pau Monne
2019-02-12 10:52   ` Wei Liu
2019-02-13 15:32   ` Jan Beulich
2019-02-11 17:46 ` [PATCH for-4.12 v2 2/7] amd/npt/shadow: replace assert that prevents creating 2M/1G MMIO entries Roger Pau Monne
2019-02-13 15:53   ` Jan Beulich
2019-02-14 13:59     ` Roger Pau Monné
2019-02-14 14:48       ` Jan Beulich
2019-02-11 17:46 ` [PATCH for-4.12 v2 3/7] x86/pvh: reorder PVH dom0 iommu initialization Roger Pau Monne
2019-02-13 15:58   ` Jan Beulich
2019-02-11 17:46 ` [PATCH for-4.12 v2 4/7] pvh/dom0: warn when dom0_mem is not set Roger Pau Monne
2019-02-12 10:52   ` Wei Liu
2019-02-13 16:01   ` Jan Beulich
2019-02-13 17:13     ` Roger Pau Monné
2019-02-14  8:09       ` Jan Beulich [this message]
2019-02-11 17:46 ` [PATCH v2 5/7] x86/mm: split p2m ioreq server pages special handling into helper Roger Pau Monne
2019-02-13 10:23   ` Paul Durrant
2019-02-11 17:46 ` [PATCH v2 6/7] x86/mm: handle foreign mappings in p2m_entry_modify Roger Pau Monne
2019-02-14 11:25   ` Jan Beulich
2019-02-14 12:12     ` Roger Pau Monné
2019-02-14 12:25       ` Jan Beulich
2019-02-11 17:46 ` [PATCH v2 7/7] npt/shadow: allow getting foreign page table entries Roger Pau Monne
2019-02-14 11:38   ` Jan Beulich
2019-02-14 12:16     ` Roger Pau Monné
2019-02-14 12:30       ` Jan Beulich
2019-02-11 19:50 ` [PATCH for-4.12 v2 0/7] pvh/dom0/shadow/amd fixes Sander Eikelenboom

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=5C65223502000078002168FD@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jgross@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --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.