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: pbonzini@redhat.com, mst@redhat.com, qemu-devel@nongnu.org,
	david@gibson.dropbear.id.au, ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 1/2] memhp: extend address auto assignment to support gaps
Date: Thu, 8 Oct 2015 19:16:10 +0530	[thread overview]
Message-ID: <20151008134610.GA30384@in.ibm.com> (raw)
In-Reply-To: <20151008133109.GA29460@in.ibm.com>

On Thu, Oct 08, 2015 at 07:01:09PM +0530, Bharata B Rao wrote:
> > @@ -333,13 +334,15 @@ uint64_t pc_dimm_get_free_addr(uint64_t address_space_start,
> >              goto out;
> >          }
> > 
> > -        if (ranges_overlap(dimm->addr, dimm_size, new_addr, size)) {
> > +        if (ranges_overlap(dimm->addr, dimm_size, new_addr,
> > +                           size + (gap ? 1 : 0))) {
> >              if (hint) {
> >                  DeviceState *d = DEVICE(dimm);
> >                  error_setg(errp, "address range conflicts with '%s'", d->id);
> >                  goto out;
> >              }
> > -            new_addr = QEMU_ALIGN_UP(dimm->addr + dimm_size, align);
> > +            new_addr = QEMU_ALIGN_UP(dimm->addr + dimm_size + (gap ? 1 : 0),
> > +                                     align);
> 
> This change of adding 1 byte gap will break PowerPC memory hotplug in
> its current form.

Sorry should have been explicit in saying that this will break PowerPC
memory hotplug only if gap is enabled like I attempted here:

https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg00749.html

> 
> Currently we divide hotpluggable memory region into chuncks of 256M
> and there is a DR connector object for each such chunk. The DR connector
> object maintains/controls the state transitions of that memory chunk
> as per PAPR specifications.
> 
> Now after this 1 byte gap, we end up having a 64K alignment (default
> page size) for the DIMM address and end up having an address for which
> there is no DR connector object. I will have to revisit the parts of
> the code in PowerPC that creates DR connector objects and looks them up
> by address.
> 
> Regards,
> Bharata.

  reply	other threads:[~2015-10-08 13:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 14:53 [Qemu-devel] [PATCH v3 0/2] pc: memhp: enforce gaps between DIMMs Igor Mammedov
2015-09-29 14:53 ` [Qemu-devel] [PATCH v3 1/2] memhp: extend address auto assignment to support gaps Igor Mammedov
2015-10-02 15:26   ` Eduardo Habkost
2015-10-08 13:31   ` Bharata B Rao
2015-10-08 13:46     ` Bharata B Rao [this message]
2015-10-08 13:51     ` Igor Mammedov
2015-09-29 14:53 ` [Qemu-devel] [PATCH v3 2/2] pc: memhp: force gaps between DIMM's GPA Igor Mammedov

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=20151008134610.GA30384@in.ibm.com \
    --to=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@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).