Received: from eggs.gnu.org ([2001:4830:134:3::10]:36523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vkx8A-00007f-NF for qemu-devel@nongnu.org; Mon, 25 Nov 2013 09:27:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vkx84-0007Nk-Nk for qemu-devel@nongnu.org; Mon, 25 Nov 2013 09:27:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vkx84-0007Ng-Fj for qemu-devel@nongnu.org; Mon, 25 Nov 2013 09:27:12 -0500 Date: Mon, 25 Nov 2013 15:26:56 +0100 From: Igor Mammedov Message-ID: <20131125152656.3656205c@nial.usersys.redhat.com> In-Reply-To: <529353D4.1060702@redhat.com> References: <1385001528-12003-1-git-send-email-imammedo@redhat.com> <1385001528-12003-24-git-send-email-imammedo@redhat.com> <529353D4.1060702@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 23/27] pc: ACPI BIOS: implement memory hotplug interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, aliguori@amazon.com, stefanb@linux.vnet.ibm.com, armbru@redhat.com, mst@redhat.com, mjt@tls.msk.ru, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, vasilis.liaskovitis@profitbricks.com, quintela@redhat.com, kraxel@redhat.com, stefanha@redhat.com, hutao@cn.fujitsu.com, marcel.a@redhat.com, lcapitulino@redhat.com, chegu_vinod@hp.com, afaerber@suse.de On Mon, 25 Nov 2013 14:42:44 +0100 Paolo Bonzini wrote: > Il 21/11/2013 03:38, Igor Mammedov ha scritto: > > + // 64-bit math: MAX = MIN + LEN - 1 > > + Add(MINL, LENL, MAXL) > > + Add(MINH, LENH, MAXH) > > + If (Or(LLess(MAXL, MINL), LLess(MAXL, LENL))) { > > The Or is not necessary, LLess(MAXL, MINL) is enough. ok, I'll fix it. > > > + Add(MAXH, 1, MAXH) > > One? (Just for consistency, iasl does it already). sure > > > + } > > > + // Ignore (MAXL == 0 & MAXH == 0) case > > + If (LEqual(MAXL, Zero)) { > > + Subtract(MAXH, One, MAXH) > > + Store(0xFFFFFFFF, MAXL) > > + } Else { > > + Subtract(MAXL, One, MAXL) > > + } > > + > > Why not this: > > If (LLess(MAXL, One)) { > Subtract(MAXH, One, MAXH) > } > Subtract(MAXL, One, MAXL) I'll try it, thanks! > > Paolo