From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwrO6-0004jC-3n for qemu-devel@nongnu.org; Tue, 17 Jun 2014 07:17:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwrNy-0004v5-Ly for qemu-devel@nongnu.org; Tue, 17 Jun 2014 07:17:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwrKt-0003sm-HP for qemu-devel@nongnu.org; Tue, 17 Jun 2014 07:13:55 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5HBDrOF011039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 17 Jun 2014 07:13:53 -0400 Date: Tue, 17 Jun 2014 14:14:20 +0300 From: "Michael S. Tsirkin" Message-ID: <20140617111420.GA7217@redhat.com> References: <1402936423-25147-1-git-send-email-imammedo@redhat.com> <1402936423-25147-4-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1402936423-25147-4-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/4] fixup! pc: add memory hotplug handler to PC_MACHINE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org On Mon, Jun 16, 2014 at 06:33:42PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov Note that properties are all int64. I think we need a new kind of "RAM offset" property that verifies that the supplied value is a valid ram offset. > --- > hw/i386/pc.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 73daa07..e993b0f 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -1564,8 +1564,8 @@ static void pc_dimm_plug(HotplugHandler *hotplug_dev, > PCDIMMDevice *dimm = PC_DIMM(dev); > PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm); > MemoryRegion *mr = ddc->get_memory_region(dimm); > - ram_addr_t addr = object_property_get_int(OBJECT(dimm), PC_DIMM_ADDR_PROP, > - &local_err); > + uint64_t addr = object_property_get_int(OBJECT(dimm), PC_DIMM_ADDR_PROP, > + &local_err); > if (local_err) { > goto out; > } > -- > 1.7.1