From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj7dS-00066D-RX for qemu-devel@nongnu.org; Mon, 05 Oct 2015 11:25:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj7dO-00071u-Se for qemu-devel@nongnu.org; Mon, 05 Oct 2015 11:25:06 -0400 References: <1444034124-28747-1-git-send-email-bharata@linux.vnet.ibm.com> <1444034124-28747-2-git-send-email-bharata@linux.vnet.ibm.com> From: Thomas Huth Message-ID: <56129648.7090701@redhat.com> Date: Mon, 5 Oct 2015 17:24:56 +0200 MIME-Version: 1.0 In-Reply-To: <1444034124-28747-2-git-send-email-bharata@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v0 1/2] spapr: Accommadate alignment gaps in hotplug memory region List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao , qemu-devel@nongnu.org Cc: imammedo@redhat.com, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au On 05/10/15 10:35, Bharata B Rao wrote: > Size hotplug memory region assuming a 256MB max alignment every slot. > > Signed-off-by: Bharata B Rao > --- > hw/ppc/spapr.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index fc5e7d6..2ec509b 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -1792,6 +1792,9 @@ static void ppc_spapr_init(MachineState *machine) > > spapr->hotplug_memory.base = ROUND_UP(machine->ram_size, > SPAPR_HOTPLUG_MEM_ALIGN); > + > + /* size hotplug region assuming 256M max alignment per slot */ > + hotplug_mem_size += SPAPR_MEMORY_BLOCK_SIZE * machine->ram_slots; Could you maybe make the comment here a little bit more verbose? Without reading the cover letter first, I would not understand this piece of code ... and I'm afraid that when we look at this code in a couple of years again, we hit the same problem when the comment is that short. Thanks, Thomas