[Qemu-devel] [PULL 00/46] First batch of s390x patches for 2.12

Cornelia Huck posted 46 patches 6 years, 3 months ago
Only 45 patches received!
There is a newer version of this series
hw/s390x/3270-ccw.c          |   2 +-
hw/s390x/css-bridge.c        |  13 ++
hw/s390x/css.c               |  34 +----
hw/s390x/s390-ccw.c          |   2 +-
hw/s390x/s390-pci-bus.h      |   1 +
hw/s390x/s390-pci-inst.c     | 337 +++++++++++++++++++++++++------------------
hw/s390x/s390-pci-inst.h     |  22 ++-
hw/s390x/s390-virtio-ccw.c   |  58 +++++++-
hw/s390x/virtio-ccw.c        |   2 +-
include/hw/compat.h          |   3 +
include/hw/s390x/css.h       |  13 +-
pc-bios/s390-ccw.img         | Bin 26416 -> 26416 bytes
pc-bios/s390-ccw/start.S     |  30 +++-
qemu-doc.texi                |   8 +
qemu-options.hx              |   8 +-
target/s390x/cc_helper.c     |   2 +-
target/s390x/cpu.h           |  31 +++-
target/s390x/cpu_models.c    | 103 ++++++-------
target/s390x/cpu_models.h    |   1 +
target/s390x/crypto_helper.c |   7 +-
target/s390x/diag.c          |  14 +-
target/s390x/excp_helper.c   |  17 +--
target/s390x/fpu_helper.c    |   2 +-
target/s390x/gen-features.c  |  88 +++++++++++
target/s390x/helper.c        |  18 ---
target/s390x/helper.h        |   6 +-
target/s390x/insn-data.def   |  29 ++--
target/s390x/int_helper.c    |  14 +-
target/s390x/internal.h      |  41 +++---
target/s390x/interrupt.c     |   9 +-
target/s390x/ioinst.c        | 113 +++++++--------
target/s390x/kvm.c           |  84 ++++-------
target/s390x/mem_helper.c    |  35 ++---
target/s390x/misc_helper.c   | 111 ++++++++------
target/s390x/mmu_helper.c    |  23 ++-
target/s390x/translate.c     | 191 ++++++++++++++++++++----
36 files changed, 927 insertions(+), 545 deletions(-)
[Qemu-devel] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Cornelia Huck 6 years, 3 months ago
The following changes since commit 0ef0583d5adceb9138bdb47494dabd1549ac5b6d:

  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20171214' into staging (2017-12-14 15:32:32 +0000)

are available in the git repository at:

  git://github.com/cohuck/qemu tags/s390x-20171214

for you to fetch changes up to a9e3065c6579df8652ce38502276ac0a13180d6f:

  s390-ccw-virtio: allow for systems larger that 7.999TB (2017-12-14 17:56:54 +0100)

----------------------------------------------------------------
s390x changes for 2.12:
- Lots of tcg improvements: ccw hotplug is now working and we can run
  a Linux kernel built for z12 under tcg
- zPCI improvements to get virtio-pci working
- get rid of the cssid restrictions for virtual and non-virtual channel
  devices
- we now support 8TB+ systems
- 2.12 compat machine
- fixes and cleanups

----------------------------------------------------------------

Christian Borntraeger (3):
  s390x/migration: use zero flag parameter
  pc-bios/s390-ccw: zero out bss section
  s390-ccw-virtio: allow for systems larger that 7.999TB

Cornelia Huck (4):
  pc-bios/s390-ccw.img: update image
  s390x: introduce 2.12 compat machine
  target/s390x: nuke DPRINTF in helper.c
  s390x/css: attach css bridge

David Hildenbrand (30):
  s390x/tcg: introduce and use s390_program_interrupt()
  s390x/tcg: get rid of runtime_exception()
  s390x/tcg: rip out dead tpi code
  s390x/ioinst: pass the retaddr to all IO instructions
  s390x/pci: pass the retaddr to all PCI instructions
  s390x/diag: pass the retaddr into handle_diag_308()
  s390x: handle exceptions during s390_cpu_virt_mem_rw() correctly (TCG)
  s390x/tcg: don't exit the cpu loop in s390_cpu_virt_mem_rw()
  s390x/tcg: io instructions don't need potential_page_fault()
  s390x/tcg: use s390_program_interrupt() in SCLP Service Call
  s390x/tcg: use s390_program_interrupt() in DIAG
  s390x/tcg: use s390_program_interrupt() in per_check_exception()
  s390x/tcg: use s390_program_interrupt() in SACF
  s390x/tcg: use s390_program_interrupt() in STSI
  s390x/tcg: drop program_interrupt()
  s390x/tcg: drop potential_page_fault()
  s390x/kvm: factor out build_channel_report_mcic() into cpu.h
  s390x/tcg: fix and cleanup mcck injection
  s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD
  s390x/tcg: indicate value of TODPR in STCKE
  s390x/tcg: wire up STORE CHANNEL REPORT WORD
  s390x/tcg: ASI/ASGI/ALSI/ALSGI are atomic with Interlocked-acccess
    facility 1
  s390x/tcg: implement Interlocked-Access Facility 2
  s390x/tcg: wire up SET ADDRESS LIMIT
  s390x/tcg: wire up SET CHANNEL MONITOR
  s390x/tcg: Implement STORE CHANNEL PATH STATUS
  s390x/tcg: Implement SIGNAL ADAPTER instruction
  s390x/tcg: implement extract-CPU-time facility
  s390x/tcg: we already implement the Set-Program-Parameter facility
  s390x: change the QEMU cpu model to a stripped down z12

Halil Pasic (2):
  s390x/css: unrestrict cssids
  s390x: deprecate s390-squash-mcss machine prop

Pierre Morel (7):
  s390x/pci: factor out endianess conversion
  s390x/pci: rework PCI STORE
  s390x/pci: rework PCI LOAD
  s390x/pci: rework PCI STORE BLOCK
  s390x/pci: move the memory region read from pcilg
  s390x/pci: move the memory region write from pcistg
  s390x/pci: search for subregion inside the BARs

 hw/s390x/3270-ccw.c          |   2 +-
 hw/s390x/css-bridge.c        |  13 ++
 hw/s390x/css.c               |  34 +----
 hw/s390x/s390-ccw.c          |   2 +-
 hw/s390x/s390-pci-bus.h      |   1 +
 hw/s390x/s390-pci-inst.c     | 337 +++++++++++++++++++++++++------------------
 hw/s390x/s390-pci-inst.h     |  22 ++-
 hw/s390x/s390-virtio-ccw.c   |  58 +++++++-
 hw/s390x/virtio-ccw.c        |   2 +-
 include/hw/compat.h          |   3 +
 include/hw/s390x/css.h       |  13 +-
 pc-bios/s390-ccw.img         | Bin 26416 -> 26416 bytes
 pc-bios/s390-ccw/start.S     |  30 +++-
 qemu-doc.texi                |   8 +
 qemu-options.hx              |   8 +-
 target/s390x/cc_helper.c     |   2 +-
 target/s390x/cpu.h           |  31 +++-
 target/s390x/cpu_models.c    | 103 ++++++-------
 target/s390x/cpu_models.h    |   1 +
 target/s390x/crypto_helper.c |   7 +-
 target/s390x/diag.c          |  14 +-
 target/s390x/excp_helper.c   |  17 +--
 target/s390x/fpu_helper.c    |   2 +-
 target/s390x/gen-features.c  |  88 +++++++++++
 target/s390x/helper.c        |  18 ---
 target/s390x/helper.h        |   6 +-
 target/s390x/insn-data.def   |  29 ++--
 target/s390x/int_helper.c    |  14 +-
 target/s390x/internal.h      |  41 +++---
 target/s390x/interrupt.c     |   9 +-
 target/s390x/ioinst.c        | 113 +++++++--------
 target/s390x/kvm.c           |  84 ++++-------
 target/s390x/mem_helper.c    |  35 ++---
 target/s390x/misc_helper.c   | 111 ++++++++------
 target/s390x/mmu_helper.c    |  23 ++-
 target/s390x/translate.c     | 191 ++++++++++++++++++++----
 36 files changed, 927 insertions(+), 545 deletions(-)

-- 
2.13.6


Re: [Qemu-devel] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Peter Maydell 6 years, 3 months ago
On 14 December 2017 at 17:09, Cornelia Huck <cohuck@redhat.com> wrote:
> The following changes since commit 0ef0583d5adceb9138bdb47494dabd1549ac5b6d:
>
>   Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20171214' into staging (2017-12-14 15:32:32 +0000)
>
> are available in the git repository at:
>
>   git://github.com/cohuck/qemu tags/s390x-20171214
>
> for you to fetch changes up to a9e3065c6579df8652ce38502276ac0a13180d6f:
>
>   s390-ccw-virtio: allow for systems larger that 7.999TB (2017-12-14 17:56:54 +0100)
>
> ----------------------------------------------------------------
> s390x changes for 2.12:
> - Lots of tcg improvements: ccw hotplug is now working and we can run
>   a Linux kernel built for z12 under tcg
> - zPCI improvements to get virtio-pci working
> - get rid of the cssid restrictions for virtual and non-virtual channel
>   devices
> - we now support 8TB+ systems
> - 2.12 compat machine
> - fixes and cleanups
>
> ----------------------------------------------------------------

Hi; I'm afraid this fails to build on 32-bit:

In file included from
/usr/lib/arm-linux-gnueabihf/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /home/peter.maydell/qemu/include/glib-compat.h:19,
                 from /home/peter.maydell/qemu/include/qemu/osdep.h:107,
                 from /home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c:13:
/home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c: In function
's390_memory_init':
/usr/include/glib-2.0/glib/gmacros.h:291:26: error: comparison is
always true due to limited range of data type [-Werror=type-limits]
 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
                          ^
/home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c:177:17: note: in
expansion of macro 'MIN'
         chunk = MIN(mem_size, KVM_SLOT_MAX_BYTES);
                 ^

(ram_addr_t can be a 32-bit type).

thanks
-- PMM

Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Christian Borntraeger 6 years, 3 months ago

On 12/14/2017 08:05 PM, Peter Maydell wrote:
> On 14 December 2017 at 17:09, Cornelia Huck <cohuck@redhat.com> wrote:
>> The following changes since commit 0ef0583d5adceb9138bdb47494dabd1549ac5b6d:
>>
>>   Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20171214' into staging (2017-12-14 15:32:32 +0000)
>>
>> are available in the git repository at:
>>
>>   git://github.com/cohuck/qemu tags/s390x-20171214
>>
>> for you to fetch changes up to a9e3065c6579df8652ce38502276ac0a13180d6f:
>>
>>   s390-ccw-virtio: allow for systems larger that 7.999TB (2017-12-14 17:56:54 +0100)
>>
>> ----------------------------------------------------------------
>> s390x changes for 2.12:
>> - Lots of tcg improvements: ccw hotplug is now working and we can run
>>   a Linux kernel built for z12 under tcg
>> - zPCI improvements to get virtio-pci working
>> - get rid of the cssid restrictions for virtual and non-virtual channel
>>   devices
>> - we now support 8TB+ systems
>> - 2.12 compat machine
>> - fixes and cleanups
>>
>> ----------------------------------------------------------------
> 
> Hi; I'm afraid this fails to build on 32-bit:
> 
> In file included from
> /usr/lib/arm-linux-gnueabihf/glib-2.0/include/glibconfig.h:9:0,
>                  from /usr/include/glib-2.0/glib/gtypes.h:32,
>                  from /usr/include/glib-2.0/glib/galloca.h:32,
>                  from /usr/include/glib-2.0/glib.h:30,
>                  from /home/peter.maydell/qemu/include/glib-compat.h:19,
>                  from /home/peter.maydell/qemu/include/qemu/osdep.h:107,
>                  from /home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c:13:
> /home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c: In function
> 's390_memory_init':
> /usr/include/glib-2.0/glib/gmacros.h:291:26: error: comparison is
> always true due to limited range of data type [-Werror=type-limits]
>  #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
>                           ^
> /home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c:177:17: note: in
> expansion of macro 'MIN'
>          chunk = MIN(mem_size, KVM_SLOT_MAX_BYTES);
>                  ^
> 
> (ram_addr_t can be a 32-bit type).

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;


Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Cornelia Huck 6 years, 3 months ago
On Fri, 15 Dec 2017 09:35:10 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On 12/14/2017 08:05 PM, Peter Maydell wrote:
> > On 14 December 2017 at 17:09, Cornelia Huck <cohuck@redhat.com> wrote:  
> >> The following changes since commit 0ef0583d5adceb9138bdb47494dabd1549ac5b6d:
> >>
> >>   Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20171214' into staging (2017-12-14 15:32:32 +0000)
> >>
> >> are available in the git repository at:
> >>
> >>   git://github.com/cohuck/qemu tags/s390x-20171214
> >>
> >> for you to fetch changes up to a9e3065c6579df8652ce38502276ac0a13180d6f:
> >>
> >>   s390-ccw-virtio: allow for systems larger that 7.999TB (2017-12-14 17:56:54 +0100)
> >>
> >> ----------------------------------------------------------------
> >> s390x changes for 2.12:
> >> - Lots of tcg improvements: ccw hotplug is now working and we can run
> >>   a Linux kernel built for z12 under tcg
> >> - zPCI improvements to get virtio-pci working
> >> - get rid of the cssid restrictions for virtual and non-virtual channel
> >>   devices
> >> - we now support 8TB+ systems
> >> - 2.12 compat machine
> >> - fixes and cleanups
> >>
> >> ----------------------------------------------------------------  
> > 
> > Hi; I'm afraid this fails to build on 32-bit:
> > 
> > In file included from
> > /usr/lib/arm-linux-gnueabihf/glib-2.0/include/glibconfig.h:9:0,
> >                  from /usr/include/glib-2.0/glib/gtypes.h:32,
> >                  from /usr/include/glib-2.0/glib/galloca.h:32,
> >                  from /usr/include/glib-2.0/glib.h:30,
> >                  from /home/peter.maydell/qemu/include/glib-compat.h:19,
> >                  from /home/peter.maydell/qemu/include/qemu/osdep.h:107,
> >                  from /home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c:13:
> > /home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c: In function
> > 's390_memory_init':
> > /usr/include/glib-2.0/glib/gmacros.h:291:26: error: comparison is
> > always true due to limited range of data type [-Werror=type-limits]
> >  #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
> >                           ^
> > /home/peter.maydell/qemu/hw/s390x/s390-virtio-ccw.c:177:17: note: in
> > expansion of macro 'MIN'
> >          chunk = MIN(mem_size, KVM_SLOT_MAX_BYTES);
> >                  ^
> > 
> > (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...

> 
> 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.

Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Peter Maydell 6 years, 3 months ago
On 15 December 2017 at 09:11, Cornelia Huck <cohuck@redhat.com> wrote:
> On Fri, 15 Dec 2017 09:35:10 +0100
> Christian Borntraeger <borntraeger@de.ibm.com> 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.

>>
>> 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.

thanks
-- PMM

Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Cornelia Huck 6 years, 3 months ago
On Fri, 15 Dec 2017 09:51:32 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:

> On 15 December 2017 at 09:11, Cornelia Huck <cohuck@redhat.com> wrote:
> > On Fri, 15 Dec 2017 09:35:10 +0100
> > Christian Borntraeger <borntraeger@de.ibm.com> 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.

Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Peter Maydell 6 years, 3 months ago
On 15 December 2017 at 10:21, Cornelia Huck <cohuck@redhat.com> wrote:
> On Fri, 15 Dec 2017 09:51:32 +0000
> Peter Maydell <peter.maydell@linaro.org> wrote:
>
>> On 15 December 2017 at 09:11, Cornelia Huck <cohuck@redhat.com> wrote:
>> > On Fri, 15 Dec 2017 09:35:10 +0100
>> > Christian Borntraeger <borntraeger@de.ibm.com> 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.

Maybe your mingw build is mingw-w64 rather than -w32 ?

thanks
-- PMM

Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Cornelia Huck 6 years, 3 months ago
On Fri, 15 Dec 2017 10:33:28 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:

> On 15 December 2017 at 10:21, Cornelia Huck <cohuck@redhat.com> wrote:
> > On Fri, 15 Dec 2017 09:51:32 +0000
> > Peter Maydell <peter.maydell@linaro.org> wrote:
> >  
> >> On 15 December 2017 at 09:11, Cornelia Huck <cohuck@redhat.com> wrote:  
> >> > On Fri, 15 Dec 2017 09:35:10 +0100
> >> > Christian Borntraeger <borntraeger@de.ibm.com> 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.  
> 
> Maybe your mingw build is mingw-w64 rather than -w32 ?

It's mingw32-w64 so it seems it's actually w64. Confusing naming.

Anyway, I now have a 32 bit build machine, and the uint64_t cast seems
to work. I'll send an updated pull request (OK if I don't send the
other 45 patches again?)

Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by David Hildenbrand 6 years, 3 months ago
> 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);

directly cast inline?

>          memory_region_allocate_system_memory(ram, NULL, name, chunk);
>          memory_region_add_subregion(sysmem, offset, ram);
>          mem_size -= chunk;
> 


-- 

Thanks,

David / dhildenb

Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by Christian Borntraeger 6 years, 3 months ago

On 12/15/2017 10:53 AM, David Hildenbrand wrote:
> 
>> 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);
> 
> directly cast inline?
As I said, this still triggers the warning. gcc 7 is too clever.


Re: [Qemu-devel] [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12
Posted by David Hildenbrand 6 years, 3 months ago
On 15.12.2017 10:53, Christian Borntraeger wrote:
> 
> 
> On 12/15/2017 10:53 AM, David Hildenbrand wrote:
>>
>>> 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);
>>
>> directly cast inline?
> As I said, this still triggers the warning. gcc 7 is too clever.

Whoops missed that.


-- 

Thanks,

David / dhildenb

[Qemu-devel] [PULL 03/46] pc-bios/s390-ccw.img: update image
Posted by Cornelia Huck 6 years, 3 months ago
Contains the following commit:
- pc-bios/s390-ccw: zero out bss section

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 pc-bios/s390-ccw.img | Bin 26416 -> 26416 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/pc-bios/s390-ccw.img b/pc-bios/s390-ccw.img
index 7415f1a3e797a17ce4ede0ee39034288b4ecae86..97155d2638eebc1220a63287fcada21df65b3a77 100644
GIT binary patch
delta 1426
zcmYLJT}%{L6h3EISr;e_umTG#4$C6lg0Qj{s)*giwU!p@@?*uHs7*v4G`d>q4@s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