loader: remove shouting from ORB's variable name
[hvf.git] / cp / include / sie.h
blobfd3d5bb6b2c51f0aa0db40e36416d09849f6af96
1 /*
2 * (C) Copyright 2007-2010 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
5 * details.
6 */
8 #ifndef __SIE_H
9 #define __SIE_H
12 * Taken from linux/arch/s390/include/asm/kvm_host.h
15 #include <atomic.h>
18 * Constants for sie_cb->cpuflags
20 #define CPUSTAT_HOST 0x80000000
21 #define CPUSTAT_WAIT 0x10000000
22 #define CPUSTAT_ECALL_PEND 0x08000000
23 #define CPUSTAT_STOP_INT 0x04000000
24 #define CPUSTAT_IO_INT 0x02000000
25 #define CPUSTAT_EXT_INT 0x01000000
26 #define CPUSTAT_RUNNING 0x00800000
27 #define CPUSTAT_RETAINED 0x00400000
28 #define CPUSTAT_TIMING_SUB 0x00020000
29 #define CPUSTAT_SIE_SUB 0x00010000
30 #define CPUSTAT_RRF 0x00008000
31 #define CPUSTAT_SLSV 0x00004000
32 #define CPUSTAT_SLSR 0x00002000
33 #define CPUSTAT_ZARCH 0x00000800
34 #define CPUSTAT_MCDS 0x00000100
35 #define CPUSTAT_SM 0x00000080
36 #define CPUSTAT_G 0x00000008
37 #define CPUSTAT_J 0x00000002
38 #define CPUSTAT_P 0x00000001
40 struct sie_cb {
41 atomic_t cpuflags; /* 0x0000 */
42 u32 prefix; /* 0x0004 */
43 u8 reserved8[32]; /* 0x0008 */
44 u64 cputm; /* 0x0028 */
45 u64 ckc; /* 0x0030 */
46 u64 epoch; /* 0x0038 */
47 u8 reserved40[4]; /* 0x0040 */
48 #define LCTL_CR0 0x8000
49 u16 lctl; /* 0x0044 */
50 s16 icpua; /* 0x0046 */
51 u32 ictl; /* 0x0048 */
52 u32 eca; /* 0x004c */
53 u8 icptcode; /* 0x0050 */
54 u8 reserved51; /* 0x0051 */
55 u16 ihcpu; /* 0x0052 */
56 u8 reserved54[2]; /* 0x0054 */
57 u16 ipa; /* 0x0056 */
58 u32 ipb; /* 0x0058 */
59 u32 scaoh; /* 0x005c */
60 u8 reserved60; /* 0x0060 */
61 u8 ecb; /* 0x0061 */
62 u8 reserved62[2]; /* 0x0062 */
63 u32 scaol; /* 0x0064 */
64 u8 reserved68[4]; /* 0x0068 */
65 u32 todpr; /* 0x006c */
66 u8 reserved70[16]; /* 0x0070 */
67 u64 gmsor; /* 0x0080 */
68 u64 gmslm; /* 0x0088 */
69 struct psw gpsw; /* 0x0090 */
70 u64 gg14; /* 0x00a0 */
71 u64 gg15; /* 0x00a8 */
72 u8 reservedb0[30]; /* 0x00b0 */
73 u16 iprcc; /* 0x00ce */
74 u8 reservedd0[48]; /* 0x00d0 */
75 u64 gcr[16]; /* 0x0100 */
76 u64 gbea; /* 0x0180 */
77 u8 reserved188[120]; /* 0x0188 */
78 } __attribute__((aligned(256),packed));
80 #define VCPU_ZARCH(vcpu) (atomic_read(&((vcpu)->sie_cb.cpuflags)) & CPUSTAT_ZARCH)
82 #endif