xqemu/hw/vfio
Daniel P. Berrangé e1d0b37261 hw/vfio/ccw: avoid taking address members in packed structs
The GCC 9 compiler complains about many places in s390 code
that take the address of members of the 'struct SCHIB' which
is marked packed:

hw/vfio/ccw.c: In function ‘vfio_ccw_io_notifier_handler’:
hw/vfio/ccw.c:133:15: warning: taking address of packed member of ‘struct SCHIB’ may result in an unaligned pointer value \
[-Waddress-of-packed-member]
  133 |     SCSW *s = &sch->curr_status.scsw;
      |               ^~~~~~~~~~~~~~~~~~~~~~
hw/vfio/ccw.c:134:15: warning: taking address of packed member of ‘struct SCHIB’ may result in an unaligned pointer value \
[-Waddress-of-packed-member]
  134 |     PMCW *p = &sch->curr_status.pmcw;
      |               ^~~~~~~~~~~~~~~~~~~~~~

...snip many more...

Almost all of these are just done for convenience to avoid
typing out long variable/field names when referencing struct
members. We can get most of this convenience by taking the
address of the 'struct SCHIB' instead, avoiding triggering
the compiler warnings.

In a couple of places we copy via a local variable which is
a technique already applied elsewhere in s390 code for this
problem.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190329111104.17223-12-berrange@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-04-03 11:19:57 +02:00
..
amd-xgbe.c vfio/platform: Make the vfio-platform device non-abstract 2018-10-15 10:52:09 -06:00
ap.c s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device 2019-03-04 11:49:31 +01:00
calxeda-xgmac.c vfio/platform: Make the vfio-platform device non-abstract 2018-10-15 10:52:09 -06:00
ccw.c hw/vfio/ccw: avoid taking address members in packed structs 2019-04-03 11:19:57 +02:00
common.c vfio: Make vfio_get_region_info_cap public 2019-03-12 16:17:35 +11:00
display.c vfio/display: delay link up event 2019-03-11 12:59:59 -06:00
Kconfig vfio-pci: enable by default 2019-03-11 14:45:10 +01:00
Makefile.objs hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI 2019-02-05 16:50:21 +01:00
pci-quirks.c pci: Move NVIDIA vendor id to the rest of ids 2019-02-22 10:51:31 -05:00
pci.c vfio/display: add xres + yres properties 2019-03-11 12:59:59 -06:00
pci.h vfio/display: add xres + yres properties 2019-03-11 12:59:59 -06:00
platform.c vfio: Clean up error reporting after previous commit 2018-10-19 14:51:34 +02:00
spapr.c vfio/spapr: Rename local systempagesize variable 2019-03-12 10:50:59 +11:00
trace-events trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00