qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: mdroth@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [RFC PATCH v0 1/5] spapr: Provide better error message when slots exceed max allowed
Date: Mon, 3 Aug 2015 16:43:03 +1000	[thread overview]
Message-ID: <20150803064303.GA31111@voom.redhat.com> (raw)
In-Reply-To: <1438580143-587-2-git-send-email-bharata@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]

On Mon, Aug 03, 2015 at 11:05:39AM +0530, Bharata B Rao wrote:
> Currently when user specifies more slots than allowed max of
> SPAPR_MAX_RAM_SLOTS (32), we error out like this:
> 
> qemu-system-ppc64: unsupported amount of memory slots: 64
> 
> Let the user know about the max allowed slots like this:
> 
> qemu-system-ppc64: Specified number of memory slots 64 exceeds max supported 32
> 
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>

So, this is good as far as it goes.  There's another problem here
though.

At present even requesting 32 slots will not work properly, because
KVM only supports 32 slots and a couple of those are already used for
the non-hotplug RAM.  I think fixing this requires a kernel change to
advertise the available KVM memory slots.

> ---
>  hw/ppc/spapr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 6e24bf9..6d9cbd9 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -1777,8 +1777,8 @@ static void ppc_spapr_init(MachineState *machine)
>          ram_addr_t hotplug_mem_size = machine->maxram_size - machine->ram_size;
>  
>          if (machine->ram_slots > SPAPR_MAX_RAM_SLOTS) {
> -            error_report("unsupported amount of memory slots: %"PRIu64,
> -                          machine->ram_slots);
> +            error_report("Specified number of memory slots %"PRIu64" exceeds max supported %d\n",
> +                         machine->ram_slots, SPAPR_MAX_RAM_SLOTS);
>              exit(EXIT_FAILURE);
>          }
>  

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-08-03  6:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03  5:35 [Qemu-devel] [RFC PATCH v0 0/5] spapr-next: Memory hotplug updates Bharata B Rao
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 1/5] spapr: Provide better error message when slots exceed max allowed Bharata B Rao
2015-08-03  6:43   ` David Gibson [this message]
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 2/5] spapr: Populate ibm, associativity-lookup-arrays correctly for non-NUMA Bharata B Rao
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 3/5] spapr: Revert to memory@XXXX representation for non-hotplugged memory Bharata B Rao
2015-08-04 14:33   ` Nathan Fontenot
2015-08-05  3:42     ` Bharata B Rao
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 4/5] spapr: Support hotplug by specifying DRC count Bharata B Rao
2015-08-03  6:55   ` David Gibson
2015-08-03  7:53     ` Bharata B Rao
2015-08-03 22:32       ` Michael Roth
2015-08-04  4:36         ` David Gibson
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 5/5] spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type Bharata B Rao
2015-08-12  1:32 ` [Qemu-devel] [RFC PATCH v0 0/5] spapr-next: Memory hotplug updates David Gibson

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=20150803064303.GA31111@voom.redhat.com \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 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).