Lines Matching refs:field
13 void vmread_error(unsigned long field);
14 void vmwrite_error(unsigned long field, unsigned long value);
39 void vmread_error_trampoline2(unsigned long field, bool fault);
43 static __always_inline void vmcs_check16(unsigned long field) in vmcs_check16() argument
45 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2000, in vmcs_check16()
47 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001, in vmcs_check16()
49 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x4000, in vmcs_check16()
51 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x6000, in vmcs_check16()
55 static __always_inline void vmcs_check32(unsigned long field) in vmcs_check32() argument
57 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0, in vmcs_check32()
59 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2000, in vmcs_check32()
61 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001, in vmcs_check32()
63 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x6000, in vmcs_check32()
67 static __always_inline void vmcs_check64(unsigned long field) in vmcs_check64() argument
69 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0, in vmcs_check64()
71 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001, in vmcs_check64()
73 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x4000, in vmcs_check64()
75 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x6000, in vmcs_check64()
79 static __always_inline void vmcs_checkl(unsigned long field) in vmcs_checkl() argument
81 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0, in vmcs_checkl()
83 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2000, in vmcs_checkl()
85 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001, in vmcs_checkl()
87 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x4000, in vmcs_checkl()
91 static __always_inline unsigned long __vmcs_readl(unsigned long field) in __vmcs_readl() argument
103 : [field] "r" (field) in __vmcs_readl()
111 vmread_error(field); in __vmcs_readl()
147 : ASM_CALL_CONSTRAINT, "=&r"(value) : "r"(field) : "cc"); in __vmcs_readl()
153 static __always_inline u16 vmcs_read16(unsigned long field) in vmcs_read16() argument
155 vmcs_check16(field); in vmcs_read16()
157 return evmcs_read16(field); in vmcs_read16()
158 return __vmcs_readl(field); in vmcs_read16()
161 static __always_inline u32 vmcs_read32(unsigned long field) in vmcs_read32() argument
163 vmcs_check32(field); in vmcs_read32()
165 return evmcs_read32(field); in vmcs_read32()
166 return __vmcs_readl(field); in vmcs_read32()
169 static __always_inline u64 vmcs_read64(unsigned long field) in vmcs_read64() argument
171 vmcs_check64(field); in vmcs_read64()
173 return evmcs_read64(field); in vmcs_read64()
175 return __vmcs_readl(field); in vmcs_read64()
177 return __vmcs_readl(field) | ((u64)__vmcs_readl(field+1) << 32); in vmcs_read64()
181 static __always_inline unsigned long vmcs_readl(unsigned long field) in vmcs_readl() argument
183 vmcs_checkl(field); in vmcs_readl()
185 return evmcs_read64(field); in vmcs_readl()
186 return __vmcs_readl(field); in vmcs_readl()
223 static __always_inline void __vmcs_writel(unsigned long field, unsigned long value) in __vmcs_writel() argument
225 vmx_asm2(vmwrite, "r"(field), "rm"(value), field, value); in __vmcs_writel()
228 static __always_inline void vmcs_write16(unsigned long field, u16 value) in vmcs_write16() argument
230 vmcs_check16(field); in vmcs_write16()
232 return evmcs_write16(field, value); in vmcs_write16()
234 __vmcs_writel(field, value); in vmcs_write16()
237 static __always_inline void vmcs_write32(unsigned long field, u32 value) in vmcs_write32() argument
239 vmcs_check32(field); in vmcs_write32()
241 return evmcs_write32(field, value); in vmcs_write32()
243 __vmcs_writel(field, value); in vmcs_write32()
246 static __always_inline void vmcs_write64(unsigned long field, u64 value) in vmcs_write64() argument
248 vmcs_check64(field); in vmcs_write64()
250 return evmcs_write64(field, value); in vmcs_write64()
252 __vmcs_writel(field, value); in vmcs_write64()
254 __vmcs_writel(field+1, value >> 32); in vmcs_write64()
258 static __always_inline void vmcs_writel(unsigned long field, unsigned long value) in vmcs_writel() argument
260 vmcs_checkl(field); in vmcs_writel()
262 return evmcs_write64(field, value); in vmcs_writel()
264 __vmcs_writel(field, value); in vmcs_writel()
267 static __always_inline void vmcs_clear_bits(unsigned long field, u32 mask) in vmcs_clear_bits() argument
269 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000, in vmcs_clear_bits()
272 return evmcs_write32(field, evmcs_read32(field) & ~mask); in vmcs_clear_bits()
274 __vmcs_writel(field, __vmcs_readl(field) & ~mask); in vmcs_clear_bits()
277 static __always_inline void vmcs_set_bits(unsigned long field, u32 mask) in vmcs_set_bits() argument
279 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000, in vmcs_set_bits()
282 return evmcs_write32(field, evmcs_read32(field) | mask); in vmcs_set_bits()
284 __vmcs_writel(field, __vmcs_readl(field) | mask); in vmcs_set_bits()