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 <imamm...@redhat.com> > --- > 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