Configuring QEMU with:
configure --cc=clang --target-list=s390x-softmmu
And compiling it using a 32 bit machine leads to:
hw/s390x/s390-virtio-ccw.c:175:27: error: implicit conversion from
'unsigned long long' to 'ram_addr_t' (aka 'unsigned int') changes value
from 8796091973632 to 4293918720 [-Werror,-Wconstant-conversion]
chunk = MIN(size, KVM_SLOT_MAX_BYTES);
~ ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
Fix the missmatch by declaring the 'chunk' variable as uint64_t.
Signed-off-by: Marcel Apfelbaum <[email protected]>
---
hw/s390x/s390-virtio-ccw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index d11069b860..2efa47bc3e 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -161,7 +161,7 @@ static void virtio_ccw_register_hcalls(void)
static void s390_memory_init(ram_addr_t mem_size)
{
MemoryRegion *sysmem = get_system_memory();
- ram_addr_t chunk, offset = 0;
+ uint64_t chunk, offset = 0;
unsigned int number = 0;
gchar *name;
--
2.17.1