Lines Matching refs:vmcs

67 #include "vmcs.h"
463 noinline void vmclear_error(struct vmcs *vmcs, u64 phys_addr)
466 vmcs, phys_addr, vmcs_read32(VM_INSTRUCTION_ERROR));
469 noinline void vmptrld_error(struct vmcs *vmcs, u64 phys_addr)
472 vmcs, phys_addr, vmcs_read32(VM_INSTRUCTION_ERROR));
487 static DEFINE_PER_CPU(struct vmcs *, vmxarea);
488 DEFINE_PER_CPU(struct vmcs *, current_vmcs);
546 evmcs = (struct hv_enlightened_vmcs *)to_vmx(vcpu)->loaded_vmcs->vmcs;
776 vmcs_clear(v->vmcs);
788 if (per_cpu(current_vmcs, cpu) == loaded_vmcs->vmcs)
791 vmcs_clear(loaded_vmcs->vmcs);
1414 struct vmcs *prev;
1434 if (prev != vmx->loaded_vmcs->vmcs) {
1435 per_cpu(current_vmcs, cpu) = vmx->loaded_vmcs->vmcs;
1436 vmcs_load(vmx->loaded_vmcs->vmcs);
1445 if (!buddy || WARN_ON_ONCE(buddy->vmcs != prev))
1694 * vmcs.GUEST_RIP points at the exit point of the enclave, not
2856 struct vmcs *alloc_vmcs_cpu(bool shadow, int cpu, gfp_t flags)
2860 struct vmcs *vmcs;
2865 vmcs = page_address(pages);
2866 memset(vmcs, 0, vmcs_config.size);
2870 vmcs->hdr.revision_id = KVM_EVMCS_VERSION;
2872 vmcs->hdr.revision_id = vmcs_config.revision_id;
2875 vmcs->hdr.shadow_vmcs = 1;
2876 return vmcs;
2879 void free_vmcs(struct vmcs *vmcs)
2881 free_page((unsigned long)vmcs);
2889 if (!loaded_vmcs->vmcs)
2892 free_vmcs(loaded_vmcs->vmcs);
2893 loaded_vmcs->vmcs = NULL;
2901 loaded_vmcs->vmcs = alloc_vmcs(false);
2902 if (!loaded_vmcs->vmcs)
2905 vmcs_clear(loaded_vmcs->vmcs);
2946 struct vmcs *vmcs;
2948 vmcs = alloc_vmcs_cpu(false, cpu, GFP_KERNEL);
2949 if (!vmcs) {
2956 * vmcs->revision_id to KVM_EVMCS_VERSION instead of
2965 vmcs->hdr.revision_id = vmcs_config.revision_id;
2967 per_cpu(vmxarea, cpu) = vmcs;
3310 * (correctly) stop reading vmcs.GUEST_CR3 because it thinks
3397 else /* vmcs.GUEST_CR3 is already up-to-date. */
3946 struct hv_enlightened_vmcs *evmcs = (void *)vmx->vmcs01.vmcs;
4284 * Set up the vmcs's constant host-state fields, i.e., host-state fields that
5279 * For all other #DBs, set vmcs.PENDING_DBG_EXCEPTIONS.BS
6277 vmx->loaded_vmcs->vmcs, vcpu->arch.last_vmentry_cpu);
7358 * Refresh vmcs.HOST_CR3 if necessary. This must be done immediately
7529 struct hv_enlightened_vmcs *evmcs = (void *)vmx->vmcs01.vmcs;