Lines Matching +full:0 +full:- +full:63

1 /* SPDX-License-Identifier: GPL-2.0 */
11 #define GHCB_MSR_INFO_POS 0
13 #define GHCB_MSR_INFO_MASK (BIT_ULL(GHCB_DATA_LOW) - 1)
19 #define GHCB_MSR_SEV_INFO_RESP 0x001
20 #define GHCB_MSR_SEV_INFO_REQ 0x002
23 /* GHCBData[63:48] */ \
24 ((((_max) & 0xffff) << 48) | \
26 (((_min) & 0xffff) << 32) | \
28 (((_cbit) & 0xff) << 24) | \
31 #define GHCB_MSR_INFO(v) ((v) & 0xfffUL)
32 #define GHCB_MSR_PROTO_MAX(v) (((v) >> 48) & 0xffff)
33 #define GHCB_MSR_PROTO_MIN(v) (((v) >> 32) & 0xffff)
36 #define GHCB_MSR_CPUID_REQ 0x004
37 #define GHCB_MSR_CPUID_RESP 0x005
39 #define GHCB_MSR_CPUID_FUNC_MASK 0xffffffff
41 #define GHCB_MSR_CPUID_VALUE_MASK 0xffffffff
43 #define GHCB_MSR_CPUID_REG_MASK 0x3
44 #define GHCB_CPUID_REQ_EAX 0
49 /* GHCBData[11:0] */ \
52 (((unsigned long)(reg) & 0x3) << 30) | \
53 /* GHCBData[63:32] */ \
57 #define GHCB_MSR_AP_RESET_HOLD_REQ 0x006
58 #define GHCB_MSR_AP_RESET_HOLD_RESP 0x007
60 #define GHCB_MSR_AP_RESET_HOLD_RESULT_MASK GENMASK_ULL(51, 0)
63 #define GHCB_MSR_PREF_GPA_REQ 0x010
65 #define GHCB_MSR_GPA_VALUE_MASK GENMASK_ULL(51, 0)
67 #define GHCB_MSR_PREF_GPA_RESP 0x011
68 #define GHCB_MSR_PREF_GPA_NONE 0xfffffffffffff
71 #define GHCB_MSR_REG_GPA_REQ 0x012
73 /* GHCBData[63:12] */ \
74 (((u64)((v) & GENMASK_ULL(51, 0)) << 12) | \
75 /* GHCBData[11:0] */ \
78 #define GHCB_MSR_REG_GPA_RESP 0x013
80 /* GHCBData[63:12] */ \
81 (((u64)(v) & GENMASK_ULL(63, 12)) >> 12)
86 * GHCBData[55:52] - Page operation:
87 * 0x0001 Page assignment, Private
88 * 0x0002 Page assignment, Shared
95 #define GHCB_MSR_PSC_REQ 0x014
98 (((u64)((op) & 0xf) << 52) | \
100 ((u64)((gfn) & GENMASK_ULL(39, 0)) << 12) | \
101 /* GHCBData[11:0] */ \
107 #define GHCB_MSR_PSC_RESP 0x015
109 /* GHCBData[63:32] */ \
110 (((u64)(val) & GENMASK_ULL(63, 32)) >> 32)
113 #define GHCB_MSR_PSC_RESP_ERROR (BIT_ULL(63) | GHCB_MSR_PSC_RESP)
116 #define GHCB_MSR_VMPL_REQ 0x016
119 (((u64)(v) & GENMASK_ULL(7, 0) << 32) | \
120 /* GHCBDdata[11:0] */ \
123 #define GHCB_MSR_VMPL_RESP 0x017
125 /* GHCBData[63:32] */ \
126 (((u64)(v) & GENMASK_ULL(63, 32)) >> 32)
129 #define GHCB_MSR_HV_FT_REQ 0x080
130 #define GHCB_MSR_HV_FT_RESP 0x081
132 #define GHCB_MSR_HV_FT_MASK GENMASK_ULL(51, 0)
134 /* GHCBData[63:12] */ \
135 (((u64)(v) & GENMASK_ULL(63, 12)) >> 12)
137 #define GHCB_HV_FT_SNP BIT_ULL(0)
147 * Use VMGEXIT_PSC_MAX_COUNT in cases where the actual GHCB-defined max value
153 #define VMGEXIT_PSC_ERROR_GENERIC (0x100UL << 32)
179 #define GHCB_MSR_TERM_REQ 0x100
181 #define GHCB_MSR_TERM_REASON_SET_MASK 0xf
183 #define GHCB_MSR_TERM_REASON_MASK 0xff
187 (((((u64)reason_set) & 0xf) << 12) | \
189 ((((u64)reason_val) & 0xff) << 16))
191 /* Error codes from reason set 0 */
192 #define SEV_TERM_SET_GEN 0
193 #define GHCB_SEV_ES_GEN_REQ 0
197 /* Linux-specific reason codes (used with reason set 1) */
199 #define GHCB_TERM_REGISTER 0 /* GHCB GPA registration failure */
202 #define GHCB_TERM_NOT_VMPL0 3 /* SNP guest is not running at VMPL-0 */
203 #define GHCB_TERM_CPUID 4 /* CPUID-validation failure */
207 #define GHCB_TERM_SVSM_VMPL0 8 /* SVSM is present but has set VMPL to 0 */
214 * by setting the lower 32-bits of the GHCB SW_EXITINFO1 field to 2.