[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
From: |
Cornelia Huck |
Subject: |
Re: [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12 |
Date: |
Fri, 15 Dec 2017 11:21:38 +0100 |
On Fri, 15 Dec 2017 09:51:32 +0000
Peter Maydell <address@hidden> wrote:
> On 15 December 2017 at 09:11, Cornelia Huck <address@hidden> wrote:
> > On Fri, 15 Dec 2017 09:35:10 +0100
> > Christian Borntraeger <address@hidden> wrote:
> >
> >> On 12/14/2017 08:05 PM, Peter Maydell wrote:
> >> > (ram_addr_t can be a 32-bit type).
> >
> > This a 32 bit host, isn't it? I don't have regular access to one...
>
> Yes. Win32 cross compiler also gives this error.
Hm, my mingw build on Fedora did not catch this. Setting up a 32bit vm.
>
> >>
> >> gcc seems to be extra clever, even a cast does not work.
> >> Something like this seems to work.
> >>
> >> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> >> index 80e753a5ef..9abb8de9f9 100644
> >> --- a/hw/s390x/s390-virtio-ccw.c
> >> +++ b/hw/s390x/s390-virtio-ccw.c
> >> @@ -172,9 +172,10 @@ static void s390_memory_init(ram_addr_t mem_size)
> >> name = g_strdup_printf("s390.ram");
> >> while (mem_size) {
> >> MemoryRegion *ram = g_new(MemoryRegion, 1);
> >> + unsigned long long size = mem_size;
> >>
> >> /* KVM does not allow memslots >= 8 TB */
> >> - chunk = MIN(mem_size, KVM_SLOT_MAX_BYTES);
> >> + chunk = MIN(size, KVM_SLOT_MAX_BYTES);
> >> memory_region_allocate_system_memory(ram, NULL, name, chunk);
> >> memory_region_add_subregion(sysmem, offset, ram);
> >> mem_size -= chunk;
> >>
> >
> > Will see how I can test this and then merge it.
>
> I would suggest uint64_t rather than unsigned long long.
Will try how that works.
- [qemu-s390x] [PULL 41/46] s390x/tcg: Implement STORE CHANNEL PATH STATUS, (continued)
- [qemu-s390x] [PULL 41/46] s390x/tcg: Implement STORE CHANNEL PATH STATUS, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 42/46] s390x/tcg: Implement SIGNAL ADAPTER instruction, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 44/46] s390x/tcg: we already implement the Set-Program-Parameter facility, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 43/46] s390x/tcg: implement extract-CPU-time facility, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 46/46] s390-ccw-virtio: allow for systems larger that 7.999TB, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 45/46] s390x: change the QEMU cpu model to a stripped down z12, Cornelia Huck, 2017/12/14
- Re: [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12, Peter Maydell, 2017/12/14
- Re: [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12, David Hildenbrand, 2017/12/15
- Re: [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12, Christian Borntraeger, 2017/12/15
- Re: [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12, David Hildenbrand, 2017/12/15