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