qemu/include/hw/s390x
Cornelia Huck a4e2fff1b1 s390x/pci: fix endianness issues
The zPCI group and function structures are big endian. However, we do
not consistently store them as big endian locally, and are missing some
conversions.

Let's just store the structures as host endian instead and convert to
big endian when actually handling the instructions retrieving the data.

Also fix the layout of ClpReqQueryPciGrp: g is actually only 8 bit. This
also fixes accesses on little endian hosts, and makes accesses on big
endian hosts consistent.

Fixes: 28dc86a072 ("s390x/pci: use a PCI Group structure")
Fixes: 9670ee7527 ("s390x/pci: use a PCI Function structure")
Fixes: 1e7552ff5c ("s390x/pci: get zPCI function info from host")
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Tested-by: Matthew Rosato <mjrosato@linux.ibm.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201118104202.1301363-1-cohuck@redhat.com>
2020-11-18 16:59:29 +01:00
..
3270-ccw.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
adapter.h
ap-bridge.h s390x/ap: base Adjunct Processor (AP) object model 2018-10-12 11:32:18 +02:00
ap-device.h ap-device: Rename AP_DEVICE_TYPE to TYPE_AP_DEVICE 2020-09-09 13:20:22 -04:00
css-bridge.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
css.h s390x/css: Refactor the css_queue_crw() routine 2020-06-18 12:13:54 +02:00
ebcdic.h
event-facility.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
ioinst.h hw/s390x/ioinst: Fix alignment problem in struct SubchDev 2018-10-04 10:32:38 +02:00
pv.h s390x: pv: Fix KVM_PV_PREP_RESET command wrapper name 2020-06-05 17:13:11 +02:00
s390_flic.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
s390-ccw.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
s390-pci-bus.h s390x/pci: get zPCI function info from host 2020-11-01 12:30:52 -07:00
s390-pci-clp.h s390x/pci: fix endianness issues 2020-11-18 16:59:29 +01:00
s390-pci-inst.h s390x/pci: create a header dedicated to PCI CLP 2020-11-01 12:30:52 -07:00
s390-pci-vfio.h s390x: fix build for --without-default-devices 2020-11-05 13:04:07 +01:00
s390-virtio-ccw.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
sclp.h s390: guest support for diagnose 0x318 2020-10-02 13:52:49 +02:00
storage-attributes.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
storage-keys.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
tod.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
vfio-ccw.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00