xref: /linux/arch/s390/include/uapi/asm/kvm.h (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef __LINUX_KVM_S390_H
3 #define __LINUX_KVM_S390_H
4 /*
5  * KVM s390 specific structures and definitions
6  *
7  * Copyright IBM Corp. 2008, 2018
8  *
9  *    Author(s): Carsten Otte <cotte@de.ibm.com>
10  *               Christian Borntraeger <borntraeger@de.ibm.com>
11  */
12 #include <linux/types.h>
13 
14 #define __KVM_S390
15 
16 struct kvm_s390_skeys {
17 	__u64 start_gfn;
18 	__u64 count;
19 	__u64 skeydata_addr;
20 	__u32 flags;
21 	__u32 reserved[9];
22 };
23 
24 #define KVM_S390_CMMA_PEEK (1 << 0)
25 
26 /**
27  * kvm_s390_cmma_log - Used for CMMA migration.
28  *
29  * Used both for input and output.
30  *
31  * @start_gfn: Guest page number to start from.
32  * @count: Size of the result buffer.
33  * @flags: Control operation mode via KVM_S390_CMMA_* flags
34  * @remaining: Used with KVM_S390_GET_CMMA_BITS. Indicates how many dirty
35  *             pages are still remaining.
36  * @mask: Used with KVM_S390_SET_CMMA_BITS. Bitmap of bits to actually set
37  *        in the PGSTE.
38  * @values: Pointer to the values buffer.
39  *
40  * Used in KVM_S390_{G,S}ET_CMMA_BITS ioctls.
41  */
42 struct kvm_s390_cmma_log {
43 	__u64 start_gfn;
44 	__u32 count;
45 	__u32 flags;
46 	union {
47 		__u64 remaining;
48 		__u64 mask;
49 	};
50 	__u64 values;
51 };
52 
53 #define KVM_S390_RESET_POR       1
54 #define KVM_S390_RESET_CLEAR     2
55 #define KVM_S390_RESET_SUBSYSTEM 4
56 #define KVM_S390_RESET_CPU_INIT  8
57 #define KVM_S390_RESET_IPL       16
58 
59 /* for KVM_S390_MEM_OP */
60 struct kvm_s390_mem_op {
61 	/* in */
62 	__u64 gaddr;		/* the guest address */
63 	__u64 flags;		/* flags */
64 	__u32 size;		/* amount of bytes */
65 	__u32 op;		/* type of operation */
66 	__u64 buf;		/* buffer in userspace */
67 	union {
68 		struct {
69 			__u8 ar;	/* the access register number */
70 			__u8 key;	/* access key, ignored if flag unset */
71 			__u8 pad1[6];	/* ignored */
72 			__u64 old_addr;	/* ignored if cmpxchg flag unset */
73 		};
74 		__u32 sida_offset; /* offset into the sida */
75 		__u8 reserved[32]; /* ignored */
76 	};
77 };
78 /* types for kvm_s390_mem_op->op */
79 #define KVM_S390_MEMOP_LOGICAL_READ	0
80 #define KVM_S390_MEMOP_LOGICAL_WRITE	1
81 #define KVM_S390_MEMOP_SIDA_READ	2
82 #define KVM_S390_MEMOP_SIDA_WRITE	3
83 #define KVM_S390_MEMOP_ABSOLUTE_READ	4
84 #define KVM_S390_MEMOP_ABSOLUTE_WRITE	5
85 #define KVM_S390_MEMOP_ABSOLUTE_CMPXCHG	6
86 
87 /* flags for kvm_s390_mem_op->flags */
88 #define KVM_S390_MEMOP_F_CHECK_ONLY		(1ULL << 0)
89 #define KVM_S390_MEMOP_F_INJECT_EXCEPTION	(1ULL << 1)
90 #define KVM_S390_MEMOP_F_SKEY_PROTECTION	(1ULL << 2)
91 
92 /* flags specifying extension support via KVM_CAP_S390_MEM_OP_EXTENSION */
93 #define KVM_S390_MEMOP_EXTENSION_CAP_BASE	(1 << 0)
94 #define KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG	(1 << 1)
95 
96 struct kvm_s390_psw {
97 	__u64 mask;
98 	__u64 addr;
99 };
100 
101 /* valid values for type in kvm_s390_interrupt */
102 #define KVM_S390_SIGP_STOP		0xfffe0000u
103 #define KVM_S390_PROGRAM_INT		0xfffe0001u
104 #define KVM_S390_SIGP_SET_PREFIX	0xfffe0002u
105 #define KVM_S390_RESTART		0xfffe0003u
106 #define KVM_S390_INT_PFAULT_INIT	0xfffe0004u
107 #define KVM_S390_INT_PFAULT_DONE	0xfffe0005u
108 #define KVM_S390_MCHK			0xfffe1000u
109 #define KVM_S390_INT_CLOCK_COMP		0xffff1004u
110 #define KVM_S390_INT_CPU_TIMER		0xffff1005u
111 #define KVM_S390_INT_VIRTIO		0xffff2603u
112 #define KVM_S390_INT_SERVICE		0xffff2401u
113 #define KVM_S390_INT_EMERGENCY		0xffff1201u
114 #define KVM_S390_INT_EXTERNAL_CALL	0xffff1202u
115 /* Anything below 0xfffe0000u is taken by INT_IO */
116 #define KVM_S390_INT_IO(ai,cssid,ssid,schid)   \
117 	(((schid)) |			       \
118 	 ((ssid) << 16) |		       \
119 	 ((cssid) << 18) |		       \
120 	 ((ai) << 26))
121 #define KVM_S390_INT_IO_MIN		0x00000000u
122 #define KVM_S390_INT_IO_MAX		0xfffdffffu
123 #define KVM_S390_INT_IO_AI_MASK		0x04000000u
124 
125 
126 struct kvm_s390_interrupt {
127 	__u32 type;
128 	__u32 parm;
129 	__u64 parm64;
130 };
131 
132 struct kvm_s390_io_info {
133 	__u16 subchannel_id;
134 	__u16 subchannel_nr;
135 	__u32 io_int_parm;
136 	__u32 io_int_word;
137 };
138 
139 struct kvm_s390_ext_info {
140 	__u32 ext_params;
141 	__u32 pad;
142 	__u64 ext_params2;
143 };
144 
145 struct kvm_s390_pgm_info {
146 	__u64 trans_exc_code;
147 	__u64 mon_code;
148 	__u64 per_address;
149 	__u32 data_exc_code;
150 	__u16 code;
151 	__u16 mon_class_nr;
152 	__u8 per_code;
153 	__u8 per_atmid;
154 	__u8 exc_access_id;
155 	__u8 per_access_id;
156 	__u8 op_access_id;
157 #define KVM_S390_PGM_FLAGS_ILC_VALID	0x01
158 #define KVM_S390_PGM_FLAGS_ILC_0	0x02
159 #define KVM_S390_PGM_FLAGS_ILC_1	0x04
160 #define KVM_S390_PGM_FLAGS_ILC_MASK	0x06
161 #define KVM_S390_PGM_FLAGS_NO_REWIND	0x08
162 	__u8 flags;
163 	__u8 pad[2];
164 };
165 
166 struct kvm_s390_prefix_info {
167 	__u32 address;
168 };
169 
170 struct kvm_s390_extcall_info {
171 	__u16 code;
172 };
173 
174 struct kvm_s390_emerg_info {
175 	__u16 code;
176 };
177 
178 #define KVM_S390_STOP_FLAG_STORE_STATUS	0x01
179 struct kvm_s390_stop_info {
180 	__u32 flags;
181 };
182 
183 struct kvm_s390_mchk_info {
184 	__u64 cr14;
185 	__u64 mcic;
186 	__u64 failing_storage_address;
187 	__u32 ext_damage_code;
188 	__u32 pad;
189 	__u8 fixed_logout[16];
190 };
191 
192 struct kvm_s390_irq {
193 	__u64 type;
194 	union {
195 		struct kvm_s390_io_info io;
196 		struct kvm_s390_ext_info ext;
197 		struct kvm_s390_pgm_info pgm;
198 		struct kvm_s390_emerg_info emerg;
199 		struct kvm_s390_extcall_info extcall;
200 		struct kvm_s390_prefix_info prefix;
201 		struct kvm_s390_stop_info stop;
202 		struct kvm_s390_mchk_info mchk;
203 		char reserved[64];
204 	} u;
205 };
206 
207 struct kvm_s390_irq_state {
208 	__u64 buf;
209 	__u32 flags;        /* will stay unused for compatibility reasons */
210 	__u32 len;
211 	__u32 reserved[4];  /* will stay unused for compatibility reasons */
212 };
213 
214 struct kvm_s390_ucas_mapping {
215 	__u64 user_addr;
216 	__u64 vcpu_addr;
217 	__u64 length;
218 };
219 
220 struct kvm_s390_pv_sec_parm {
221 	__u64 origin;
222 	__u64 length;
223 };
224 
225 struct kvm_s390_pv_unp {
226 	__u64 addr;
227 	__u64 size;
228 	__u64 tweak;
229 };
230 
231 enum pv_cmd_dmp_id {
232 	KVM_PV_DUMP_INIT,
233 	KVM_PV_DUMP_CONFIG_STOR_STATE,
234 	KVM_PV_DUMP_COMPLETE,
235 	KVM_PV_DUMP_CPU,
236 };
237 
238 struct kvm_s390_pv_dmp {
239 	__u64 subcmd;
240 	__u64 buff_addr;
241 	__u64 buff_len;
242 	__u64 gaddr;		/* For dump storage state */
243 	__u64 reserved[4];
244 };
245 
246 enum pv_cmd_info_id {
247 	KVM_PV_INFO_VM,
248 	KVM_PV_INFO_DUMP,
249 };
250 
251 struct kvm_s390_pv_info_dump {
252 	__u64 dump_cpu_buffer_len;
253 	__u64 dump_config_mem_buffer_per_1m;
254 	__u64 dump_config_finalize_len;
255 };
256 
257 struct kvm_s390_pv_info_vm {
258 	__u64 inst_calls_list[4];
259 	__u64 max_cpus;
260 	__u64 max_guests;
261 	__u64 max_guest_addr;
262 	__u64 feature_indication;
263 };
264 
265 struct kvm_s390_pv_info_header {
266 	__u32 id;
267 	__u32 len_max;
268 	__u32 len_written;
269 	__u32 reserved;
270 };
271 
272 struct kvm_s390_pv_info {
273 	struct kvm_s390_pv_info_header header;
274 	union {
275 		struct kvm_s390_pv_info_dump dump;
276 		struct kvm_s390_pv_info_vm vm;
277 	};
278 };
279 
280 enum pv_cmd_id {
281 	KVM_PV_ENABLE,
282 	KVM_PV_DISABLE,
283 	KVM_PV_SET_SEC_PARMS,
284 	KVM_PV_UNPACK,
285 	KVM_PV_VERIFY,
286 	KVM_PV_PREP_RESET,
287 	KVM_PV_UNSHARE_ALL,
288 	KVM_PV_INFO,
289 	KVM_PV_DUMP,
290 	KVM_PV_ASYNC_CLEANUP_PREPARE,
291 	KVM_PV_ASYNC_CLEANUP_PERFORM,
292 };
293 
294 struct kvm_pv_cmd {
295 	__u32 cmd;	/* Command to be executed */
296 	__u16 rc;	/* Ultravisor return code */
297 	__u16 rrc;	/* Ultravisor return reason code */
298 	__u64 data;	/* Data or address */
299 	__u32 flags;    /* flags for future extensions. Must be 0 for now */
300 	__u32 reserved[3];
301 };
302 
303 struct kvm_s390_zpci_op {
304 	/* in */
305 	__u32 fh;               /* target device */
306 	__u8  op;               /* operation to perform */
307 	__u8  pad[3];
308 	union {
309 		/* for KVM_S390_ZPCIOP_REG_AEN */
310 		struct {
311 			__u64 ibv;      /* Guest addr of interrupt bit vector */
312 			__u64 sb;       /* Guest addr of summary bit */
313 			__u32 flags;
314 			__u32 noi;      /* Number of interrupts */
315 			__u8 isc;       /* Guest interrupt subclass */
316 			__u8 sbo;       /* Offset of guest summary bit vector */
317 			__u16 pad;
318 		} reg_aen;
319 		__u64 reserved[8];
320 	} u;
321 };
322 
323 /* types for kvm_s390_zpci_op->op */
324 #define KVM_S390_ZPCIOP_REG_AEN                0
325 #define KVM_S390_ZPCIOP_DEREG_AEN      1
326 
327 /* flags for kvm_s390_zpci_op->u.reg_aen.flags */
328 #define KVM_S390_ZPCIOP_REGAEN_HOST    (1 << 0)
329 
330 /* Device control API: s390-specific devices */
331 #define KVM_DEV_FLIC_GET_ALL_IRQS	1
332 #define KVM_DEV_FLIC_ENQUEUE		2
333 #define KVM_DEV_FLIC_CLEAR_IRQS		3
334 #define KVM_DEV_FLIC_APF_ENABLE		4
335 #define KVM_DEV_FLIC_APF_DISABLE_WAIT	5
336 #define KVM_DEV_FLIC_ADAPTER_REGISTER	6
337 #define KVM_DEV_FLIC_ADAPTER_MODIFY	7
338 #define KVM_DEV_FLIC_CLEAR_IO_IRQ	8
339 #define KVM_DEV_FLIC_AISM		9
340 #define KVM_DEV_FLIC_AIRQ_INJECT	10
341 #define KVM_DEV_FLIC_AISM_ALL		11
342 /*
343  * We can have up to 4*64k pending subchannels + 8 adapter interrupts,
344  * as well as up  to ASYNC_PF_PER_VCPU*KVM_MAX_VCPUS pfault done interrupts.
345  * There are also sclp and machine checks. This gives us
346  * sizeof(kvm_s390_irq)*(4*65536+8+64*64+1+1) = 72 * 266250 = 19170000
347  * Lets round up to 8192 pages.
348  */
349 #define KVM_S390_MAX_FLOAT_IRQS	266250
350 #define KVM_S390_FLIC_MAX_BUFFER	0x2000000
351 
352 struct kvm_s390_io_adapter {
353 	__u32 id;
354 	__u8 isc;
355 	__u8 maskable;
356 	__u8 swap;
357 	__u8 flags;
358 };
359 
360 #define KVM_S390_ADAPTER_SUPPRESSIBLE 0x01
361 
362 struct kvm_s390_ais_req {
363 	__u8 isc;
364 	__u16 mode;
365 };
366 
367 struct kvm_s390_ais_all {
368 	__u8 simm;
369 	__u8 nimm;
370 };
371 
372 #define KVM_S390_IO_ADAPTER_MASK 1
373 #define KVM_S390_IO_ADAPTER_MAP 2
374 #define KVM_S390_IO_ADAPTER_UNMAP 3
375 
376 struct kvm_s390_io_adapter_req {
377 	__u32 id;
378 	__u8 type;
379 	__u8 mask;
380 	__u16 pad0;
381 	__u64 addr;
382 };
383 
384 /* kvm attr_group  on vm fd */
385 #define KVM_S390_VM_MEM_CTRL		0
386 #define KVM_S390_VM_TOD			1
387 #define KVM_S390_VM_CRYPTO		2
388 #define KVM_S390_VM_CPU_MODEL		3
389 #define KVM_S390_VM_MIGRATION		4
390 #define KVM_S390_VM_CPU_TOPOLOGY	5
391 
392 /* kvm attributes for mem_ctrl */
393 #define KVM_S390_VM_MEM_ENABLE_CMMA	0
394 #define KVM_S390_VM_MEM_CLR_CMMA	1
395 #define KVM_S390_VM_MEM_LIMIT_SIZE	2
396 
397 #define KVM_S390_NO_MEM_LIMIT		U64_MAX
398 
399 /* kvm attributes for KVM_S390_VM_TOD */
400 #define KVM_S390_VM_TOD_LOW		0
401 #define KVM_S390_VM_TOD_HIGH		1
402 #define KVM_S390_VM_TOD_EXT		2
403 
404 struct kvm_s390_vm_tod_clock {
405 	__u8  epoch_idx;
406 	__u64 tod;
407 };
408 
409 /* kvm attributes for KVM_S390_VM_CPU_MODEL */
410 /* processor related attributes are r/w */
411 #define KVM_S390_VM_CPU_PROCESSOR	0
412 struct kvm_s390_vm_cpu_processor {
413 	__u64 cpuid;
414 	__u16 ibc;
415 	__u8  pad[6];
416 	__u64 fac_list[256];
417 };
418 
419 /* machine related attributes are r/o */
420 #define KVM_S390_VM_CPU_MACHINE		1
421 struct kvm_s390_vm_cpu_machine {
422 	__u64 cpuid;
423 	__u32 ibc;
424 	__u8  pad[4];
425 	__u64 fac_mask[256];
426 	__u64 fac_list[256];
427 };
428 
429 #define KVM_S390_VM_CPU_PROCESSOR_FEAT	2
430 #define KVM_S390_VM_CPU_MACHINE_FEAT	3
431 
432 #define KVM_S390_VM_CPU_FEAT_NR_BITS	1024
433 #define KVM_S390_VM_CPU_FEAT_ESOP	0
434 #define KVM_S390_VM_CPU_FEAT_SIEF2	1
435 #define KVM_S390_VM_CPU_FEAT_64BSCAO	2
436 #define KVM_S390_VM_CPU_FEAT_SIIF	3
437 #define KVM_S390_VM_CPU_FEAT_GPERE	4
438 #define KVM_S390_VM_CPU_FEAT_GSLS	5
439 #define KVM_S390_VM_CPU_FEAT_IB		6
440 #define KVM_S390_VM_CPU_FEAT_CEI	7
441 #define KVM_S390_VM_CPU_FEAT_IBS	8
442 #define KVM_S390_VM_CPU_FEAT_SKEY	9
443 #define KVM_S390_VM_CPU_FEAT_CMMA	10
444 #define KVM_S390_VM_CPU_FEAT_PFMFI	11
445 #define KVM_S390_VM_CPU_FEAT_SIGPIF	12
446 #define KVM_S390_VM_CPU_FEAT_KSS	13
447 struct kvm_s390_vm_cpu_feat {
448 	__u64 feat[16];
449 };
450 
451 #define KVM_S390_VM_CPU_PROCESSOR_SUBFUNC	4
452 #define KVM_S390_VM_CPU_MACHINE_SUBFUNC		5
453 /* for "test bit" instructions MSB 0 bit ordering, for "query" raw blocks */
454 struct kvm_s390_vm_cpu_subfunc {
455 	__u8 plo[32];		/* always */
456 	__u8 ptff[16];		/* with TOD-clock steering */
457 	__u8 kmac[16];		/* with MSA */
458 	__u8 kmc[16];		/* with MSA */
459 	__u8 km[16];		/* with MSA */
460 	__u8 kimd[16];		/* with MSA */
461 	__u8 klmd[16];		/* with MSA */
462 	__u8 pckmo[16];		/* with MSA3 */
463 	__u8 kmctr[16];		/* with MSA4 */
464 	__u8 kmf[16];		/* with MSA4 */
465 	__u8 kmo[16];		/* with MSA4 */
466 	__u8 pcc[16];		/* with MSA4 */
467 	__u8 ppno[16];		/* with MSA5 */
468 	__u8 kma[16];		/* with MSA8 */
469 	__u8 kdsa[16];		/* with MSA9 */
470 	__u8 sortl[32];		/* with STFLE.150 */
471 	__u8 dfltcc[32];	/* with STFLE.151 */
472 	__u8 reserved[1728];
473 };
474 
475 #define KVM_S390_VM_CPU_PROCESSOR_UV_FEAT_GUEST	6
476 #define KVM_S390_VM_CPU_MACHINE_UV_FEAT_GUEST	7
477 
478 #define KVM_S390_VM_CPU_UV_FEAT_NR_BITS	64
479 struct kvm_s390_vm_cpu_uv_feat {
480 	union {
481 		struct {
482 			__u64 : 4;
483 			__u64 ap : 1;		/* bit 4 */
484 			__u64 ap_intr : 1;	/* bit 5 */
485 			__u64 : 58;
486 		};
487 		__u64 feat;
488 	};
489 };
490 
491 /* kvm attributes for crypto */
492 #define KVM_S390_VM_CRYPTO_ENABLE_AES_KW	0
493 #define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW	1
494 #define KVM_S390_VM_CRYPTO_DISABLE_AES_KW	2
495 #define KVM_S390_VM_CRYPTO_DISABLE_DEA_KW	3
496 #define KVM_S390_VM_CRYPTO_ENABLE_APIE		4
497 #define KVM_S390_VM_CRYPTO_DISABLE_APIE		5
498 
499 /* kvm attributes for migration mode */
500 #define KVM_S390_VM_MIGRATION_STOP	0
501 #define KVM_S390_VM_MIGRATION_START	1
502 #define KVM_S390_VM_MIGRATION_STATUS	2
503 
504 /* for KVM_GET_REGS and KVM_SET_REGS */
505 struct kvm_regs {
506 	/* general purpose regs for s390 */
507 	__u64 gprs[16];
508 };
509 
510 /* for KVM_GET_SREGS and KVM_SET_SREGS */
511 struct kvm_sregs {
512 	__u32 acrs[16];
513 	__u64 crs[16];
514 };
515 
516 /* for KVM_GET_FPU and KVM_SET_FPU */
517 struct kvm_fpu {
518 	__u32 fpc;
519 	__u64 fprs[16];
520 };
521 
522 #define KVM_GUESTDBG_USE_HW_BP		0x00010000
523 
524 #define KVM_HW_BP			1
525 #define KVM_HW_WP_WRITE			2
526 #define KVM_SINGLESTEP			4
527 
528 struct kvm_debug_exit_arch {
529 	__u64 addr;
530 	__u8 type;
531 	__u8 pad[7]; /* Should be set to 0 */
532 };
533 
534 struct kvm_hw_breakpoint {
535 	__u64 addr;
536 	__u64 phys_addr;
537 	__u64 len;
538 	__u8 type;
539 	__u8 pad[7]; /* Should be set to 0 */
540 };
541 
542 /* for KVM_SET_GUEST_DEBUG */
543 struct kvm_guest_debug_arch {
544 	__u32 nr_hw_bp;
545 	__u32 pad; /* Should be set to 0 */
546 	struct kvm_hw_breakpoint __user *hw_bp;
547 };
548 
549 /* for KVM_SYNC_PFAULT and KVM_REG_S390_PFTOKEN */
550 #define KVM_S390_PFAULT_TOKEN_INVALID	0xffffffffffffffffULL
551 
552 #define KVM_SYNC_PREFIX (1UL << 0)
553 #define KVM_SYNC_GPRS   (1UL << 1)
554 #define KVM_SYNC_ACRS   (1UL << 2)
555 #define KVM_SYNC_CRS    (1UL << 3)
556 #define KVM_SYNC_ARCH0  (1UL << 4)
557 #define KVM_SYNC_PFAULT (1UL << 5)
558 #define KVM_SYNC_VRS    (1UL << 6)
559 #define KVM_SYNC_RICCB  (1UL << 7)
560 #define KVM_SYNC_FPRS   (1UL << 8)
561 #define KVM_SYNC_GSCB   (1UL << 9)
562 #define KVM_SYNC_BPBC   (1UL << 10)
563 #define KVM_SYNC_ETOKEN (1UL << 11)
564 #define KVM_SYNC_DIAG318 (1UL << 12)
565 
566 #define KVM_SYNC_S390_VALID_FIELDS \
567 	(KVM_SYNC_PREFIX | KVM_SYNC_GPRS | KVM_SYNC_ACRS | KVM_SYNC_CRS | \
568 	 KVM_SYNC_ARCH0 | KVM_SYNC_PFAULT | KVM_SYNC_VRS | KVM_SYNC_RICCB | \
569 	 KVM_SYNC_FPRS | KVM_SYNC_GSCB | KVM_SYNC_BPBC | KVM_SYNC_ETOKEN | \
570 	 KVM_SYNC_DIAG318)
571 
572 /* length and alignment of the sdnx as a power of two */
573 #define SDNXC 8
574 #define SDNXL (1UL << SDNXC)
575 /* definition of registers in kvm_run */
576 struct kvm_sync_regs {
577 	__u64 prefix;	/* prefix register */
578 	__u64 gprs[16];	/* general purpose registers */
579 	__u32 acrs[16];	/* access registers */
580 	__u64 crs[16];	/* control registers */
581 	__u64 todpr;	/* tod programmable register [ARCH0] */
582 	__u64 cputm;	/* cpu timer [ARCH0] */
583 	__u64 ckc;	/* clock comparator [ARCH0] */
584 	__u64 pp;	/* program parameter [ARCH0] */
585 	__u64 gbea;	/* guest breaking-event address [ARCH0] */
586 	__u64 pft;	/* pfault token [PFAULT] */
587 	__u64 pfs;	/* pfault select [PFAULT] */
588 	__u64 pfc;	/* pfault compare [PFAULT] */
589 	union {
590 		__u64 vrs[32][2];	/* vector registers (KVM_SYNC_VRS) */
591 		__u64 fprs[16];		/* fp registers (KVM_SYNC_FPRS) */
592 	};
593 	__u8  reserved[512];	/* for future vector expansion */
594 	__u32 fpc;		/* valid on KVM_SYNC_VRS or KVM_SYNC_FPRS */
595 	__u8 bpbc : 1;		/* bp mode */
596 	__u8 reserved2 : 7;
597 	__u8 padding1[51];	/* riccb needs to be 64byte aligned */
598 	__u8 riccb[64];		/* runtime instrumentation controls block */
599 	__u64 diag318;		/* diagnose 0x318 info */
600 	__u8 padding2[184];	/* sdnx needs to be 256byte aligned */
601 	union {
602 		__u8 sdnx[SDNXL];  /* state description annex */
603 		struct {
604 			__u64 reserved1[2];
605 			__u64 gscb[4];
606 			__u64 etoken;
607 			__u64 etoken_extension;
608 		};
609 	};
610 };
611 
612 #define KVM_REG_S390_TODPR	(KVM_REG_S390 | KVM_REG_SIZE_U32 | 0x1)
613 #define KVM_REG_S390_EPOCHDIFF	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x2)
614 #define KVM_REG_S390_CPU_TIMER  (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x3)
615 #define KVM_REG_S390_CLOCK_COMP (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x4)
616 #define KVM_REG_S390_PFTOKEN	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x5)
617 #define KVM_REG_S390_PFCOMPARE	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x6)
618 #define KVM_REG_S390_PFSELECT	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x7)
619 #define KVM_REG_S390_PP		(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x8)
620 #define KVM_REG_S390_GBEA	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x9)
621 #endif
622