qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration
Date: Mon, 3 Aug 2015 09:16:10 +0530	[thread overview]
Message-ID: <20150803034610.GA5776@in.ibm.com> (raw)
In-Reply-To: <20150720091528.66836701@nial.brq.redhat.com>

On Mon, Jul 20, 2015 at 09:15:28AM +0200, Igor Mammedov wrote:
> On Fri, 17 Jul 2015 18:19:40 +0530
> Bharata B Rao <bharata@linux.vnet.ibm.com> wrote:
> 
> > pc_dimm_realize() validates the NUMA node to which memory hotplug is
> > being performed only in case of NUMA configuration. Include a check
> > to fail invalid nodes in case of non-NUMA configuration too.
> > 
> > Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> 
> > ---
> >  hw/mem/pc-dimm.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
> > index bb04862..099025e 100644
> > --- a/hw/mem/pc-dimm.c
> > +++ b/hw/mem/pc-dimm.c
> > @@ -414,10 +414,11 @@ static void pc_dimm_realize(DeviceState *dev, Error **errp)
> >          error_setg(errp, "'" PC_DIMM_MEMDEV_PROP "' property is not set");
> >          return;
> >      }
> > -    if ((nb_numa_nodes > 0) && (dimm->node >= nb_numa_nodes)) {
> > +    if (((nb_numa_nodes > 0) && (dimm->node >= nb_numa_nodes)) ||
> > +        (!nb_numa_nodes && dimm->node)) {
> >          error_setg(errp, "'DIMM property " PC_DIMM_NODE_PROP " has value %"
> >                     PRIu32 "' which exceeds the number of numa nodes: %d",
> > -                   dimm->node, nb_numa_nodes);
> > +                   dimm->node, nb_numa_nodes ? nb_numa_nodes : 1);
> >          return;
> >      }
> >  }

Eduardo - Will this go via your tree ?

Regards,
Bharata.

  reply	other threads:[~2015-08-03  3:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 12:49 [Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration Bharata B Rao
2015-07-20  3:52 ` David Gibson
2015-07-20  7:15 ` Igor Mammedov
2015-08-03  3:46   ` Bharata B Rao [this message]
2015-08-26 16:24 ` Eduardo Habkost
2015-09-24  6:23   ` Bharata B Rao
2015-09-24 14:50     ` Eduardo Habkost

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=20150803034610.GA5776@in.ibm.com \
    --to=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@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).