Lines Matching defs:vmcs

64 #include "vmcs.h"
457 noinline void vmclear_error(struct vmcs *vmcs, u64 phys_addr)
460 vmcs, phys_addr, vmcs_read32(VM_INSTRUCTION_ERROR));
463 noinline void vmptrld_error(struct vmcs *vmcs, u64 phys_addr)
466 vmcs, phys_addr, vmcs_read32(VM_INSTRUCTION_ERROR));
481 static DEFINE_PER_CPU(struct vmcs *, vmxarea);
482 DEFINE_PER_CPU(struct vmcs *, current_vmcs);
547 evmcs = (struct hv_enlightened_vmcs *)to_vmx(vcpu)->loaded_vmcs->vmcs;
787 vmcs_clear(v->vmcs);
799 if (per_cpu(current_vmcs, cpu) == loaded_vmcs->vmcs)
802 vmcs_clear(loaded_vmcs->vmcs);
1427 struct vmcs *prev;
1447 if (prev != vmx->loaded_vmcs->vmcs) {
1448 per_cpu(current_vmcs, cpu) = vmx->loaded_vmcs->vmcs;
1449 vmcs_load(vmx->loaded_vmcs->vmcs);
1458 if (!buddy || WARN_ON_ONCE(buddy->vmcs != prev))
1707 * vmcs.GUEST_RIP points at the exit point of the enclave, not
2867 struct vmcs *alloc_vmcs_cpu(bool shadow, int cpu, gfp_t flags)
2871 struct vmcs *vmcs;
2876 vmcs = page_address(pages);
2877 memset(vmcs, 0, vmcs_config.size);
2881 vmcs->hdr.revision_id = KVM_EVMCS_VERSION;
2883 vmcs->hdr.revision_id = vmcs_config.revision_id;
2886 vmcs->hdr.shadow_vmcs = 1;
2887 return vmcs;
2890 void free_vmcs(struct vmcs *vmcs)
2892 free_page((unsigned long)vmcs);
2900 if (!loaded_vmcs->vmcs)
2903 free_vmcs(loaded_vmcs->vmcs);
2904 loaded_vmcs->vmcs = NULL;
2912 loaded_vmcs->vmcs = alloc_vmcs(false);
2913 if (!loaded_vmcs->vmcs)
2916 vmcs_clear(loaded_vmcs->vmcs);
2957 struct vmcs *vmcs;
2959 vmcs = alloc_vmcs_cpu(false, cpu, GFP_KERNEL);
2960 if (!vmcs) {
2967 * vmcs->revision_id to KVM_EVMCS_VERSION instead of
2976 vmcs->hdr.revision_id = vmcs_config.revision_id;
2978 per_cpu(vmxarea, cpu) = vmcs;
3321 * (correctly) stop reading vmcs.GUEST_CR3 because it thinks
3408 else /* vmcs.GUEST_CR3 is already up-to-date. */
3956 struct hv_enlightened_vmcs *evmcs = (void *)vmx->vmcs01.vmcs;
4295 * Set up the vmcs's constant host-state fields, i.e., host-state fields that
5287 * For all other #DBs, set vmcs.PENDING_DBG_EXCEPTIONS.BS
6264 vmx->loaded_vmcs->vmcs, vcpu->arch.last_vmentry_cpu);
7332 * Refresh vmcs.HOST_CR3 if necessary. This must be done immediately
7504 struct hv_enlightened_vmcs *evmcs = (void *)vmx->vmcs01.vmcs;