Lines Matching defs:vmcs

62 #include "vmcs.h"
448 noinline void vmclear_error(struct vmcs *vmcs, u64 phys_addr)
450 vmx_insn_failed("kvm: vmclear failed: %p/%llx\n", vmcs, phys_addr);
453 noinline void vmptrld_error(struct vmcs *vmcs, u64 phys_addr)
455 vmx_insn_failed("kvm: vmptrld failed: %p/%llx\n", vmcs, phys_addr);
470 static DEFINE_PER_CPU(struct vmcs *, vmxarea);
471 DEFINE_PER_CPU(struct vmcs *, current_vmcs);
626 evmcs = (struct hv_enlightened_vmcs *)to_vmx(vcpu)->loaded_vmcs->vmcs;
776 vmcs_clear(v->vmcs);
787 if (per_cpu(current_vmcs, cpu) == loaded_vmcs->vmcs)
790 vmcs_clear(loaded_vmcs->vmcs);
1407 struct vmcs *prev;
1427 if (prev != vmx->loaded_vmcs->vmcs) {
1428 per_cpu(current_vmcs, cpu) = vmx->loaded_vmcs->vmcs;
1429 vmcs_load(vmx->loaded_vmcs->vmcs);
1438 if (!buddy || WARN_ON_ONCE(buddy->vmcs != prev))
1798 * Set up the vmcs to automatically save and restore system
2670 struct vmcs *alloc_vmcs_cpu(bool shadow, int cpu, gfp_t flags)
2674 struct vmcs *vmcs;
2679 vmcs = page_address(pages);
2680 memset(vmcs, 0, vmcs_config.size);
2684 vmcs->hdr.revision_id = KVM_EVMCS_VERSION;
2686 vmcs->hdr.revision_id = vmcs_config.revision_id;
2689 vmcs->hdr.shadow_vmcs = 1;
2690 return vmcs;
2693 void free_vmcs(struct vmcs *vmcs)
2695 free_pages((unsigned long)vmcs, vmcs_config.order);
2703 if (!loaded_vmcs->vmcs)
2706 free_vmcs(loaded_vmcs->vmcs);
2707 loaded_vmcs->vmcs = NULL;
2715 loaded_vmcs->vmcs = alloc_vmcs(false);
2716 if (!loaded_vmcs->vmcs)
2719 vmcs_clear(loaded_vmcs->vmcs);
2760 struct vmcs *vmcs;
2762 vmcs = alloc_vmcs_cpu(false, cpu, GFP_KERNEL);
2763 if (!vmcs) {
2770 * vmcs->revision_id to KVM_EVMCS_VERSION instead of
2779 vmcs->hdr.revision_id = vmcs_config.revision_id;
2781 per_cpu(vmxarea, cpu) = vmcs;
3108 * (correctly) stop reading vmcs.GUEST_CR3 because it thinks
3819 struct hv_enlightened_vmcs *evmcs = (void *)vmx->vmcs01.vmcs;
4133 * Set up the vmcs's constant host-state fields, i.e., host-state fields that
4975 * For all other #DBs, set vmcs.PENDING_DBG_EXCEPTIONS.BS
7069 struct hv_enlightened_vmcs *evmcs = (void *)vmx->vmcs01.vmcs;