uv.h (0aea30a07ec6b50de0fc5f5b2ec34a68ead86b61) uv.h (4689752c79fa30e91b49b39a9fba93c4d1f3e20c)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Ultravisor Interfaces
4 *
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Ultravisor Interfaces
4 *
5 * Copyright IBM Corp. 2019
5 * Copyright IBM Corp. 2019, 2022
6 *
7 * Author(s):
8 * Vasily Gorbik <gor@linux.ibm.com>
9 * Janosch Frank <frankja@linux.ibm.com>
10 */
11#ifndef _ASM_S390_UV_H
12#define _ASM_S390_UV_H
13

--- 33 unchanged lines hidden (view full) ---

47#define UVC_CMD_PREPARE_RESET 0x0320
48#define UVC_CMD_CPU_RESET_CLEAR 0x0321
49#define UVC_CMD_CPU_SET_STATE 0x0330
50#define UVC_CMD_SET_UNSHARE_ALL 0x0340
51#define UVC_CMD_PIN_PAGE_SHARED 0x0341
52#define UVC_CMD_UNPIN_PAGE_SHARED 0x0342
53#define UVC_CMD_SET_SHARED_ACCESS 0x1000
54#define UVC_CMD_REMOVE_SHARED_ACCESS 0x1001
6 *
7 * Author(s):
8 * Vasily Gorbik <gor@linux.ibm.com>
9 * Janosch Frank <frankja@linux.ibm.com>
10 */
11#ifndef _ASM_S390_UV_H
12#define _ASM_S390_UV_H
13

--- 33 unchanged lines hidden (view full) ---

47#define UVC_CMD_PREPARE_RESET 0x0320
48#define UVC_CMD_CPU_RESET_CLEAR 0x0321
49#define UVC_CMD_CPU_SET_STATE 0x0330
50#define UVC_CMD_SET_UNSHARE_ALL 0x0340
51#define UVC_CMD_PIN_PAGE_SHARED 0x0341
52#define UVC_CMD_UNPIN_PAGE_SHARED 0x0342
53#define UVC_CMD_SET_SHARED_ACCESS 0x1000
54#define UVC_CMD_REMOVE_SHARED_ACCESS 0x1001
55#define UVC_CMD_RETR_ATTEST 0x1020
55
56/* Bits in installed uv calls */
57enum uv_cmds_inst {
58 BIT_UVC_CMD_QUI = 0,
59 BIT_UVC_CMD_INIT_UV = 1,
60 BIT_UVC_CMD_CREATE_SEC_CONF = 2,
61 BIT_UVC_CMD_DESTROY_SEC_CONF = 3,
62 BIT_UVC_CMD_CREATE_SEC_CPU = 4,

--- 8 unchanged lines hidden (view full) ---

71 BIT_UVC_CMD_CPU_RESET = 15,
72 BIT_UVC_CMD_CPU_RESET_INITIAL = 16,
73 BIT_UVC_CMD_CPU_SET_STATE = 17,
74 BIT_UVC_CMD_PREPARE_RESET = 18,
75 BIT_UVC_CMD_CPU_PERFORM_CLEAR_RESET = 19,
76 BIT_UVC_CMD_UNSHARE_ALL = 20,
77 BIT_UVC_CMD_PIN_PAGE_SHARED = 21,
78 BIT_UVC_CMD_UNPIN_PAGE_SHARED = 22,
56
57/* Bits in installed uv calls */
58enum uv_cmds_inst {
59 BIT_UVC_CMD_QUI = 0,
60 BIT_UVC_CMD_INIT_UV = 1,
61 BIT_UVC_CMD_CREATE_SEC_CONF = 2,
62 BIT_UVC_CMD_DESTROY_SEC_CONF = 3,
63 BIT_UVC_CMD_CREATE_SEC_CPU = 4,

--- 8 unchanged lines hidden (view full) ---

72 BIT_UVC_CMD_CPU_RESET = 15,
73 BIT_UVC_CMD_CPU_RESET_INITIAL = 16,
74 BIT_UVC_CMD_CPU_SET_STATE = 17,
75 BIT_UVC_CMD_PREPARE_RESET = 18,
76 BIT_UVC_CMD_CPU_PERFORM_CLEAR_RESET = 19,
77 BIT_UVC_CMD_UNSHARE_ALL = 20,
78 BIT_UVC_CMD_PIN_PAGE_SHARED = 21,
79 BIT_UVC_CMD_UNPIN_PAGE_SHARED = 22,
80 BIT_UVC_CMD_RETR_ATTEST = 28,
79};
80
81enum uv_feat_ind {
82 BIT_UV_FEAT_MISC = 0,
83 BIT_UV_FEAT_AIV = 1,
84};
85
86struct uv_cb_header {

--- 127 unchanged lines hidden (view full) ---

214/* Set Shared Access */
215struct uv_cb_share {
216 struct uv_cb_header header;
217 u64 reserved08[3];
218 u64 paddr;
219 u64 reserved28;
220} __packed __aligned(8);
221
81};
82
83enum uv_feat_ind {
84 BIT_UV_FEAT_MISC = 0,
85 BIT_UV_FEAT_AIV = 1,
86};
87
88struct uv_cb_header {

--- 127 unchanged lines hidden (view full) ---

216/* Set Shared Access */
217struct uv_cb_share {
218 struct uv_cb_header header;
219 u64 reserved08[3];
220 u64 paddr;
221 u64 reserved28;
222} __packed __aligned(8);
223
224/* Retrieve Attestation Measurement */
225struct uv_cb_attest {
226 struct uv_cb_header header; /* 0x0000 */
227 u64 reserved08[2]; /* 0x0008 */
228 u64 arcb_addr; /* 0x0018 */
229 u64 cont_token; /* 0x0020 */
230 u8 reserved28[6]; /* 0x0028 */
231 u16 user_data_len; /* 0x002e */
232 u8 user_data[256]; /* 0x0030 */
233 u32 reserved130[3]; /* 0x0130 */
234 u32 meas_len; /* 0x013c */
235 u64 meas_addr; /* 0x0140 */
236 u8 config_uid[16]; /* 0x0148 */
237 u32 reserved158; /* 0x0158 */
238 u32 add_data_len; /* 0x015c */
239 u64 add_data_addr; /* 0x0160 */
240 u64 reserved168[4]; /* 0x0168 */
241} __packed __aligned(8);
242
222static inline int __uv_call(unsigned long r1, unsigned long r2)
223{
224 int cc;
225
226 asm volatile(
227 " .insn rrf,0xB9A40000,%[r1],%[r2],0,0\n"
228 " ipm %[cc]\n"
229 " srl %[cc],28\n"

--- 157 unchanged lines hidden ---
243static inline int __uv_call(unsigned long r1, unsigned long r2)
244{
245 int cc;
246
247 asm volatile(
248 " .insn rrf,0xB9A40000,%[r1],%[r2],0,0\n"
249 " ipm %[cc]\n"
250 " srl %[cc],28\n"

--- 157 unchanged lines hidden ---