Lines Matching refs:field

13 void vmread_error(unsigned long field, bool fault);
14 void vmwrite_error(unsigned long field, unsigned long value);
36 static __always_inline void vmcs_check16(unsigned long field) in vmcs_check16() argument
38 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2000, in vmcs_check16()
40 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001, in vmcs_check16()
42 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x4000, in vmcs_check16()
44 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x6000, in vmcs_check16()
48 static __always_inline void vmcs_check32(unsigned long field) in vmcs_check32() argument
50 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0, in vmcs_check32()
52 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2000, in vmcs_check32()
54 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001, in vmcs_check32()
56 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x6000, in vmcs_check32()
60 static __always_inline void vmcs_check64(unsigned long field) in vmcs_check64() argument
62 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0, in vmcs_check64()
64 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001, in vmcs_check64()
66 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x4000, in vmcs_check64()
68 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x6000, in vmcs_check64()
72 static __always_inline void vmcs_checkl(unsigned long field) in vmcs_checkl() argument
74 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0, in vmcs_checkl()
76 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2000, in vmcs_checkl()
78 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6001) == 0x2001, in vmcs_checkl()
80 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x4000, in vmcs_checkl()
84 static __always_inline unsigned long __vmcs_readl(unsigned long field) in __vmcs_readl() argument
96 : [field] "r" (field) in __vmcs_readl()
104 WARN_ONCE(1, KBUILD_MODNAME ": vmread failed: field=%lx\n", field); in __vmcs_readl()
105 pr_warn_ratelimited(KBUILD_MODNAME ": vmread failed: field=%lx\n", field); in __vmcs_readl()
141 : ASM_CALL_CONSTRAINT, "=&r"(value) : "r"(field) : "cc"); in __vmcs_readl()
147 static __always_inline u16 vmcs_read16(unsigned long field) in vmcs_read16() argument
149 vmcs_check16(field); in vmcs_read16()
151 return evmcs_read16(field); in vmcs_read16()
152 return __vmcs_readl(field); in vmcs_read16()
155 static __always_inline u32 vmcs_read32(unsigned long field) in vmcs_read32() argument
157 vmcs_check32(field); in vmcs_read32()
159 return evmcs_read32(field); in vmcs_read32()
160 return __vmcs_readl(field); in vmcs_read32()
163 static __always_inline u64 vmcs_read64(unsigned long field) in vmcs_read64() argument
165 vmcs_check64(field); in vmcs_read64()
167 return evmcs_read64(field); in vmcs_read64()
169 return __vmcs_readl(field); in vmcs_read64()
171 return __vmcs_readl(field) | ((u64)__vmcs_readl(field+1) << 32); in vmcs_read64()
175 static __always_inline unsigned long vmcs_readl(unsigned long field) in vmcs_readl() argument
177 vmcs_checkl(field); in vmcs_readl()
179 return evmcs_read64(field); in vmcs_readl()
180 return __vmcs_readl(field); in vmcs_readl()
217 static __always_inline void __vmcs_writel(unsigned long field, unsigned long value) in __vmcs_writel() argument
219 vmx_asm2(vmwrite, "r"(field), "rm"(value), field, value); in __vmcs_writel()
222 static __always_inline void vmcs_write16(unsigned long field, u16 value) in vmcs_write16() argument
224 vmcs_check16(field); in vmcs_write16()
226 return evmcs_write16(field, value); in vmcs_write16()
228 __vmcs_writel(field, value); in vmcs_write16()
231 static __always_inline void vmcs_write32(unsigned long field, u32 value) in vmcs_write32() argument
233 vmcs_check32(field); in vmcs_write32()
235 return evmcs_write32(field, value); in vmcs_write32()
237 __vmcs_writel(field, value); in vmcs_write32()
240 static __always_inline void vmcs_write64(unsigned long field, u64 value) in vmcs_write64() argument
242 vmcs_check64(field); in vmcs_write64()
244 return evmcs_write64(field, value); in vmcs_write64()
246 __vmcs_writel(field, value); in vmcs_write64()
248 __vmcs_writel(field+1, value >> 32); in vmcs_write64()
252 static __always_inline void vmcs_writel(unsigned long field, unsigned long value) in vmcs_writel() argument
254 vmcs_checkl(field); in vmcs_writel()
256 return evmcs_write64(field, value); in vmcs_writel()
258 __vmcs_writel(field, value); in vmcs_writel()
261 static __always_inline void vmcs_clear_bits(unsigned long field, u32 mask) in vmcs_clear_bits() argument
263 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000, in vmcs_clear_bits()
266 return evmcs_write32(field, evmcs_read32(field) & ~mask); in vmcs_clear_bits()
268 __vmcs_writel(field, __vmcs_readl(field) & ~mask); in vmcs_clear_bits()
271 static __always_inline void vmcs_set_bits(unsigned long field, u32 mask) in vmcs_set_bits() argument
273 BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000, in vmcs_set_bits()
276 return evmcs_write32(field, evmcs_read32(field) | mask); in vmcs_set_bits()
278 __vmcs_writel(field, __vmcs_readl(field) | mask); in vmcs_set_bits()