Lines Matching refs:vmcs12
6 #include "vmcs12.h"
40 static inline struct vmcs12 *get_vmcs12(struct kvm_vcpu *vcpu)
45 static inline struct vmcs12 *get_shadow_vmcs12(struct kvm_vcpu *vcpu)
63 * have vmcs12 if it is true.
92 static inline unsigned long nested_read_cr0(struct vmcs12 *fields)
97 static inline unsigned long nested_read_cr4(struct vmcs12 *fields)
136 static inline bool nested_cpu_has(struct vmcs12 *vmcs12, u32 bit)
138 return vmcs12->cpu_based_vm_exec_control & bit;
141 static inline bool nested_cpu_has2(struct vmcs12 *vmcs12, u32 bit)
143 return (vmcs12->cpu_based_vm_exec_control &
145 (vmcs12->secondary_vm_exec_control & bit);
148 static inline bool nested_cpu_has_preemption_timer(struct vmcs12 *vmcs12)
150 return vmcs12->pin_based_vm_exec_control &
154 static inline bool nested_cpu_has_nmi_exiting(struct vmcs12 *vmcs12)
156 return vmcs12->pin_based_vm_exec_control & PIN_BASED_NMI_EXITING;
159 static inline bool nested_cpu_has_virtual_nmis(struct vmcs12 *vmcs12)
161 return vmcs12->pin_based_vm_exec_control & PIN_BASED_VIRTUAL_NMIS;
164 static inline int nested_cpu_has_mtf(struct vmcs12 *vmcs12)
166 return nested_cpu_has(vmcs12, CPU_BASED_MONITOR_TRAP_FLAG);
169 static inline int nested_cpu_has_ept(struct vmcs12 *vmcs12)
171 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_ENABLE_EPT);
174 static inline bool nested_cpu_has_xsaves(struct vmcs12 *vmcs12)
176 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_XSAVES);
179 static inline bool nested_cpu_has_pml(struct vmcs12 *vmcs12)
181 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_ENABLE_PML);
184 static inline bool nested_cpu_has_virt_x2apic_mode(struct vmcs12 *vmcs12)
186 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE);
189 static inline bool nested_cpu_has_vpid(struct vmcs12 *vmcs12)
191 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_ENABLE_VPID);
194 static inline bool nested_cpu_has_apic_reg_virt(struct vmcs12 *vmcs12)
196 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_APIC_REGISTER_VIRT);
199 static inline bool nested_cpu_has_vid(struct vmcs12 *vmcs12)
201 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY);
204 static inline bool nested_cpu_has_posted_intr(struct vmcs12 *vmcs12)
206 return vmcs12->pin_based_vm_exec_control & PIN_BASED_POSTED_INTR;
209 static inline bool nested_cpu_has_vmfunc(struct vmcs12 *vmcs12)
211 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_ENABLE_VMFUNC);
214 static inline bool nested_cpu_has_eptp_switching(struct vmcs12 *vmcs12)
216 return nested_cpu_has_vmfunc(vmcs12) &&
217 (vmcs12->vm_function_control &
221 static inline bool nested_cpu_has_shadow_vmcs(struct vmcs12 *vmcs12)
223 return nested_cpu_has2(vmcs12, SECONDARY_EXEC_SHADOW_VMCS);
226 static inline bool nested_cpu_has_save_preemption_timer(struct vmcs12 *vmcs12)
228 return vmcs12->vm_exit_controls &
260 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
264 nested_cpu_has2(vmcs12, SECONDARY_EXEC_UNRESTRICTED_GUEST))