summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJason J. Herne <jjherne@us.ibm.com>2014-01-20 14:51:49 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-01-21 16:20:57 +0100
commit8cc3aecf8461bd38028ddb4a56a17d0a1583de36 (patch)
treef8f992b1befa7c38ed29bdcf444ca3b1b9c9586f /include
parent5f04c14a10fa7f259bc0808f35a0beda49f7821e (diff)
downloadqemu-8cc3aecf8461bd38028ddb4a56a17d0a1583de36.tar.gz
qemu-8cc3aecf8461bd38028ddb4a56a17d0a1583de36.tar.bz2
qemu-8cc3aecf8461bd38028ddb4a56a17d0a1583de36.zip
s390-sclp: SCLP CPU Info
Implement the CPU data in SCLP "Read SCP Info". And implement "Read CPU Info" SCLP command. This data will be used by the guest to get information about hot plugged cpus. Signed-off-by: Jason J. Herne <jjherne@us.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/s390x/sclp.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h
index 74e8d940b1..a6250981a5 100644
--- a/include/hw/s390x/sclp.h
+++ b/include/hw/s390x/sclp.h
@@ -79,12 +79,44 @@ typedef struct SCCBHeader {
#define SCCB_DATA_LEN (SCCB_SIZE - sizeof(SCCBHeader))
+/* CPU information */
+typedef struct CPUEntry {
+ uint8_t address;
+ uint8_t reserved0[13];
+ uint8_t type;
+ uint8_t reserved1;
+} QEMU_PACKED CPUEntry;
+
typedef struct ReadInfo {
SCCBHeader h;
uint16_t rnmax;
uint8_t rnsize;
+ uint8_t _reserved1[16 - 11]; /* 11-15 */
+ uint16_t entries_cpu; /* 16-17 */
+ uint16_t offset_cpu; /* 18-19 */
+ uint8_t _reserved2[24 - 20]; /* 20-23 */
+ uint8_t loadparm[8]; /* 24-31 */
+ uint8_t _reserved3[48 - 32]; /* 32-47 */
+ uint64_t facilities; /* 48-55 */
+ uint8_t _reserved0[100 - 56];
+ uint32_t rnsize2;
+ uint64_t rnmax2;
+ uint8_t _reserved4[120-112]; /* 112-119 */
+ uint16_t highest_cpu;
+ uint8_t _reserved5[128 - 122]; /* 122-127 */
+ struct CPUEntry entries[0];
} QEMU_PACKED ReadInfo;
+typedef struct ReadCpuInfo {
+ SCCBHeader h;
+ uint16_t nr_configured; /* 8-9 */
+ uint16_t offset_configured; /* 10-11 */
+ uint16_t nr_standby; /* 12-13 */
+ uint16_t offset_standby; /* 14-15 */
+ uint8_t reserved0[24-16]; /* 16-23 */
+ struct CPUEntry entries[0];
+} QEMU_PACKED ReadCpuInfo;
+
typedef struct SCCB {
SCCBHeader h;
char data[SCCB_DATA_LEN];