From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwrMm-0002aM-1Y for qemu-devel@nongnu.org; Tue, 17 Jun 2014 07:15:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwrMe-0004J2-JC for qemu-devel@nongnu.org; Tue, 17 Jun 2014 07:15:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwrMe-0004Iu-5B for qemu-devel@nongnu.org; Tue, 17 Jun 2014 07:15:44 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5HBFhfu020338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 17 Jun 2014 07:15:43 -0400 Date: Tue, 17 Jun 2014 14:16:11 +0300 From: "Michael S. Tsirkin" Message-ID: <20140617111611.GB7217@redhat.com> References: <1402936423-25147-1-git-send-email-imammedo@redhat.com> <1402936423-25147-5-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-5-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/4] fixup! pc: implement pc-dimm device abstraction 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:43PM +0200, Igor Mammedov wrote: > fix typecheck error in DEFINE_PROP_UINT64 when building with with clang, > on OS X ram_addr_t is uintptr_t with size 8 bytes but compiler > still refuses to accept type_check() macro as valid. > > It's still fixing consequences of how ram_addr_t is defined > but it's safer this way than to change ram_addr_t to uint64_t > unconditionally last minute. > > TODO: > is to fix ram_addr_t on 32-bit host so that it could represent > 64-bit guest addresses which is broken now if --disable-xen > configure option was used. > > Signed-off-by: Igor Mammedov > --- > include/hw/mem/pc-dimm.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h > index 5f80d14..0f4a6ba 100644 > --- a/include/hw/mem/pc-dimm.h > +++ b/include/hw/mem/pc-dimm.h > @@ -52,7 +52,7 @@ typedef struct PCDIMMDevice { > DeviceState parent_obj; > > /* public */ > - ram_addr_t addr; > + uint64_t addr; > uint32_t node; > int32_t slot; > HostMemoryBackend *hostmem; This needs some thought. HACKING explicitly says: Guest RAM memory offsets must use ram_addr_t, but only for RAM, it may not cover whole guest address space. I think we need to validate addresses where they are used/defined. > -- > 1.7.1