mbox

[PULL,00/12] s390x update

Message ID 20170117085645.4267-1-cornelia.huck@de.ibm.com
State New
Headers show

Pull-request

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

Message

Cornelia Huck Jan. 17, 2017, 8:56 a.m. UTC
The following changes since commit 2ccede18bd24fce5db83fef3674563a1f256717b:

  Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.9-pull-request' into staging (2017-01-16 12:41:35 +0000)

are available in the git repository at:

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

for you to fetch changes up to 5fd04a2b92bf81f39da63fba9e5ae563a8b929ae:

  virtio-ccw: fix ring sizing (2017-01-16 16:23:27 +0100)

----------------------------------------------------------------
First set of s390x patches for 2.9:
- rework of the zpci code, giving us proper multibus support
- introduction of the 2.9 machine
- fixes and improvements

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

Christian Borntraeger (1):
  s390x: remove double compat statement

Cornelia Huck (1):
  s390x: add compat machine for 2.9

Fei Li (1):
  s390x/kvm: use kvm_gsi_routing_enabled in flic

Michael S. Tsirkin (1):
  virtio-ccw: fix ring sizing

Pierre Morel (3):
  s390x/pci: change the device array to a list
  s390x/pci: PCI multibus bridge handling
  s390x/pci: handle PCIBridge bus number

Yi Min Zhao (5):
  s390x/pci: make S390PCIIOMMU inherit Object
  s390x/pci: dynamically allocate iommu
  s390x/pci: optimize calling s390_get_phb()
  s390x/pci: use hashtable to look up zpci via fh
  s390x/pci: merge msix init functions

 hw/intc/s390_flic_kvm.c    |   4 +-
 hw/s390x/s390-pci-bus.c    | 361 +++++++++++++++++++++++++++++----------------
 hw/s390x/s390-pci-bus.h    |  46 ++++--
 hw/s390x/s390-pci-inst.c   |  74 +++++-----
 hw/s390x/s390-pci-inst.h   |   2 +-
 hw/s390x/s390-virtio-ccw.c |  19 ++-
 hw/s390x/virtio-ccw.c      |   2 +-
 hw/virtio/virtio.c         |   5 +
 include/hw/virtio/virtio.h |   1 +
 target/s390x/kvm.c         |   2 +-
 10 files changed, 334 insertions(+), 182 deletions(-)

Comments

Peter Maydell Jan. 19, 2017, 6:32 p.m. UTC | #1
On 17 January 2017 at 08:56, Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> The following changes since commit 2ccede18bd24fce5db83fef3674563a1f256717b:
>
>   Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.9-pull-request' into staging (2017-01-16 12:41:35 +0000)
>
> are available in the git repository at:
>
>   git://github.com/cohuck/qemu tags/s390x-20170117
>
> for you to fetch changes up to 5fd04a2b92bf81f39da63fba9e5ae563a8b929ae:
>
>   virtio-ccw: fix ring sizing (2017-01-16 16:23:27 +0100)
>
> ----------------------------------------------------------------
> First set of s390x patches for 2.9:
> - rework of the zpci code, giving us proper multibus support
> - introduction of the 2.9 machine
> - fixes and improvements
>
> ----------------------------------------------------------------

Hi; I'm afraid this fails to build on Windows:

/home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
function ‘s390_pci_get_iommu’:
/home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:415:20:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
     uint64_t key = (unsigned long)bus;
                    ^
/home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
function ‘s390_pci_iommu_free’:
/home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:539:20:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
     uint64_t key = (unsigned long)bus;
                    ^
cc1: all warnings being treated as errors


You probably wanted uintptr_t.

thanks
-- PMM
Cornelia Huck Jan. 20, 2017, 9:21 a.m. UTC | #2
On Thu, 19 Jan 2017 18:32:44 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:

> Hi; I'm afraid this fails to build on Windows:
> 
> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
> function ‘s390_pci_get_iommu’:
> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:415:20:
> error: cast from pointer to integer of different size
> [-Werror=pointer-to-int-cast]
>      uint64_t key = (unsigned long)bus;
>                     ^
> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
> function ‘s390_pci_iommu_free’:
> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:539:20:
> error: cast from pointer to integer of different size
> [-Werror=pointer-to-int-cast]
>      uint64_t key = (unsigned long)bus;
>                     ^
> cc1: all warnings being treated as errors
> 
> 
> You probably wanted uintptr_t.

Fixed and v2 sent.

I'm wondering if there is any way to catch this earlier (without
actually building on Windows)? My mingw 4.8.2 cross-build worked fine...
Thomas Huth Jan. 20, 2017, 9:52 a.m. UTC | #3
On 20.01.2017 10:21, Cornelia Huck wrote:
> On Thu, 19 Jan 2017 18:32:44 +0000
> Peter Maydell <peter.maydell@linaro.org> wrote:
> 
>> Hi; I'm afraid this fails to build on Windows:
>>
>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
>> function ‘s390_pci_get_iommu’:
>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:415:20:
>> error: cast from pointer to integer of different size
>> [-Werror=pointer-to-int-cast]
>>      uint64_t key = (unsigned long)bus;
>>                     ^
>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
>> function ‘s390_pci_iommu_free’:
>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:539:20:
>> error: cast from pointer to integer of different size
>> [-Werror=pointer-to-int-cast]
>>      uint64_t key = (unsigned long)bus;
>>                     ^
>> cc1: all warnings being treated as errors
>>
>>
>> You probably wanted uintptr_t.
> 
> Fixed and v2 sent.
> 
> I'm wondering if there is any way to catch this earlier (without
> actually building on Windows)? My mingw 4.8.2 cross-build worked fine...

You likely got to use the 32-bit version of MinGW (or compile with -m32
with any other version of GCC) to catch this issue, so that you get
sizeof(long) != sizeof(void *).

 Thomas
Thomas Huth Jan. 20, 2017, 9:58 a.m. UTC | #4
On 20.01.2017 10:52, Thomas Huth wrote:
> On 20.01.2017 10:21, Cornelia Huck wrote:
>> On Thu, 19 Jan 2017 18:32:44 +0000
>> Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>>> Hi; I'm afraid this fails to build on Windows:
>>>
>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
>>> function ‘s390_pci_get_iommu’:
>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:415:20:
>>> error: cast from pointer to integer of different size
>>> [-Werror=pointer-to-int-cast]
>>>      uint64_t key = (unsigned long)bus;
>>>                     ^
>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
>>> function ‘s390_pci_iommu_free’:
>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:539:20:
>>> error: cast from pointer to integer of different size
>>> [-Werror=pointer-to-int-cast]
>>>      uint64_t key = (unsigned long)bus;
>>>                     ^
>>> cc1: all warnings being treated as errors
>>>
>>>
>>> You probably wanted uintptr_t.
>>
>> Fixed and v2 sent.
>>
>> I'm wondering if there is any way to catch this earlier (without
>> actually building on Windows)? My mingw 4.8.2 cross-build worked fine...
> 
> You likely got to use the 32-bit version of MinGW (or compile with -m32
> with any other version of GCC) to catch this issue, so that you get
> sizeof(long) != sizeof(void *).

... or was it the other way round? ... use the 64-bit version of MinGW?
... that likely makes more sense... sorry, it's been a while that I used
MinGW for the last time.

 Thomas
Cornelia Huck Jan. 20, 2017, 10 a.m. UTC | #5
On Fri, 20 Jan 2017 10:52:26 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 20.01.2017 10:21, Cornelia Huck wrote:
> > On Thu, 19 Jan 2017 18:32:44 +0000
> > Peter Maydell <peter.maydell@linaro.org> wrote:
> > 
> >> Hi; I'm afraid this fails to build on Windows:
> >>
> >> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
> >> function ‘s390_pci_get_iommu’:
> >> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:415:20:
> >> error: cast from pointer to integer of different size
> >> [-Werror=pointer-to-int-cast]
> >>      uint64_t key = (unsigned long)bus;
> >>                     ^
> >> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
> >> function ‘s390_pci_iommu_free’:
> >> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:539:20:
> >> error: cast from pointer to integer of different size
> >> [-Werror=pointer-to-int-cast]
> >>      uint64_t key = (unsigned long)bus;
> >>                     ^
> >> cc1: all warnings being treated as errors
> >>
> >>
> >> You probably wanted uintptr_t.
> > 
> > Fixed and v2 sent.
> > 
> > I'm wondering if there is any way to catch this earlier (without
> > actually building on Windows)? My mingw 4.8.2 cross-build worked fine...
> 
> You likely got to use the 32-bit version of MinGW (or compile with -m32
> with any other version of GCC) to catch this issue, so that you get
> sizeof(long) != sizeof(void *).

Well, I already do that (mingw32, and I see -m32 on the command line;
that already caught sizeof(uint64_t) != sizeof(void *) here.) But isn't
sizeof(long) == sizeof(void *) even in the -m32 case?
Thomas Huth Jan. 20, 2017, 10:04 a.m. UTC | #6
On 20.01.2017 11:00, Cornelia Huck wrote:
> On Fri, 20 Jan 2017 10:52:26 +0100
> Thomas Huth <thuth@redhat.com> wrote:
> 
>> On 20.01.2017 10:21, Cornelia Huck wrote:
>>> On Thu, 19 Jan 2017 18:32:44 +0000
>>> Peter Maydell <peter.maydell@linaro.org> wrote:
>>>
>>>> Hi; I'm afraid this fails to build on Windows:
>>>>
>>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
>>>> function ‘s390_pci_get_iommu’:
>>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:415:20:
>>>> error: cast from pointer to integer of different size
>>>> [-Werror=pointer-to-int-cast]
>>>>      uint64_t key = (unsigned long)bus;
>>>>                     ^
>>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
>>>> function ‘s390_pci_iommu_free’:
>>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:539:20:
>>>> error: cast from pointer to integer of different size
>>>> [-Werror=pointer-to-int-cast]
>>>>      uint64_t key = (unsigned long)bus;
>>>>                     ^
>>>> cc1: all warnings being treated as errors
>>>>
>>>>
>>>> You probably wanted uintptr_t.
>>>
>>> Fixed and v2 sent.
>>>
>>> I'm wondering if there is any way to catch this earlier (without
>>> actually building on Windows)? My mingw 4.8.2 cross-build worked fine...
>>
>> You likely got to use the 32-bit version of MinGW (or compile with -m32
>> with any other version of GCC) to catch this issue, so that you get
>> sizeof(long) != sizeof(void *).
> 
> Well, I already do that (mingw32, and I see -m32 on the command line;
> that already caught sizeof(uint64_t) != sizeof(void *) here.) But isn't
> sizeof(long) == sizeof(void *) even in the -m32 case?

Yes, sorry, my bad, it's the 64-bit version of MinGW where sizeof(long)
is different to sizeof(void *), see
https://sourceforge.net/p/mingw-w64/bugs/58/ for example.

 Thomas
Cornelia Huck Jan. 20, 2017, 10:11 a.m. UTC | #7
On Fri, 20 Jan 2017 11:04:29 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 20.01.2017 11:00, Cornelia Huck wrote:
> > On Fri, 20 Jan 2017 10:52:26 +0100
> > Thomas Huth <thuth@redhat.com> wrote:
> > 
> >> On 20.01.2017 10:21, Cornelia Huck wrote:
> >>> On Thu, 19 Jan 2017 18:32:44 +0000
> >>> Peter Maydell <peter.maydell@linaro.org> wrote:
> >>>
> >>>> Hi; I'm afraid this fails to build on Windows:
> >>>>
> >>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
> >>>> function ‘s390_pci_get_iommu’:
> >>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:415:20:
> >>>> error: cast from pointer to integer of different size
> >>>> [-Werror=pointer-to-int-cast]
> >>>>      uint64_t key = (unsigned long)bus;
> >>>>                     ^
> >>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c: In
> >>>> function ‘s390_pci_iommu_free’:
> >>>> /home/petmay01/linaro/qemu-for-merges/hw/s390x/s390-pci-bus.c:539:20:
> >>>> error: cast from pointer to integer of different size
> >>>> [-Werror=pointer-to-int-cast]
> >>>>      uint64_t key = (unsigned long)bus;
> >>>>                     ^
> >>>> cc1: all warnings being treated as errors
> >>>>
> >>>>
> >>>> You probably wanted uintptr_t.
> >>>
> >>> Fixed and v2 sent.
> >>>
> >>> I'm wondering if there is any way to catch this earlier (without
> >>> actually building on Windows)? My mingw 4.8.2 cross-build worked fine...
> >>
> >> You likely got to use the 32-bit version of MinGW (or compile with -m32
> >> with any other version of GCC) to catch this issue, so that you get
> >> sizeof(long) != sizeof(void *).
> > 
> > Well, I already do that (mingw32, and I see -m32 on the command line;
> > that already caught sizeof(uint64_t) != sizeof(void *) here.) But isn't
> > sizeof(long) == sizeof(void *) even in the -m32 case?
> 
> Yes, sorry, my bad, it's the 64-bit version of MinGW where sizeof(long)
> is different to sizeof(void *), see
> https://sourceforge.net/p/mingw-w64/bugs/58/ for example.

Ah, that makes sense. Thanks!