diff options
author | Cornelia Huck | 2017-07-06 17:13:14 +0200 |
---|---|---|
committer | Cornelia Huck | 2017-08-30 18:23:25 +0200 |
commit | 80b7a265362c870f95fb5ca1f7e7a02c0fa0db3e (patch) | |
tree | 854932d6cc1e81fea496caae0224d09935cac791 /include | |
parent | s390x/ccw: create s390 phb conditionally (diff) | |
download | qemu-80b7a265362c870f95fb5ca1f7e7a02c0fa0db3e.tar.gz qemu-80b7a265362c870f95fb5ca1f7e7a02c0fa0db3e.tar.xz qemu-80b7a265362c870f95fb5ca1f7e7a02c0fa0db3e.zip |
s390x/sclp: properly guard pci-specific functions
If we do not provide zpci, pci reconfiguration via sclp is not available
either. I/O adapter configuration, however, should always be present.
Rename the values that refer to I/O adapter configuration (instead of only
pci) to make things clearer.
Move length checking of the sccb for I/O adapter configuration into the
common sclp code (out of the pci code). This also fixes an issue that
the pci code would refer to a field in the sccb before checking whether
it was actually long enough.
Check for the adapter type in the sccb and return unrecognized adapter
type if the guest tries to issue I/O adapter configure/deconfigure for
a type other than pci or for pci if the zpci facility is not provided.
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/s390x/sclp.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h index fe54442ecd..a72d096081 100644 --- a/include/hw/s390x/sclp.h +++ b/include/hw/s390x/sclp.h @@ -44,10 +44,10 @@ #define SCLP_CMDW_DECONFIGURE_CPU 0x00100001 /* SCLP PCI codes */ -#define SCLP_HAS_PCI_RECONFIG 0x0000000040000000ULL -#define SCLP_CMDW_CONFIGURE_PCI 0x001a0001 -#define SCLP_CMDW_DECONFIGURE_PCI 0x001b0001 -#define SCLP_RECONFIG_PCI_ATPYE 2 +#define SCLP_HAS_IOA_RECONFIG 0x0000000040000000ULL +#define SCLP_CMDW_CONFIGURE_IOA 0x001a0001 +#define SCLP_CMDW_DECONFIGURE_IOA 0x001b0001 +#define SCLP_RECONFIG_PCI_ATYPE 2 /* SCLP response codes */ #define SCLP_RC_NORMAL_READ_COMPLETION 0x0010 @@ -168,6 +168,14 @@ typedef struct AssignStorage { uint16_t rn; } QEMU_PACKED AssignStorage; +typedef struct IoaCfgSccb { + SCCBHeader header; + uint8_t atype; + uint8_t reserved1; + uint16_t reserved2; + uint32_t aid; +} QEMU_PACKED IoaCfgSccb; + typedef struct SCCB { SCCBHeader h; char data[SCCB_DATA_LEN]; |