/linux-6.8/arch/loongarch/kvm/ |
D | main.c | 17 static struct kvm_context __percpu *vmcs; variable 200 context = per_cpu_ptr(vcpu->kvm->arch.vmcs, cpu); in kvm_update_vpid() 229 context = per_cpu_ptr(vcpu->kvm->arch.vmcs, cpu); in kvm_check_vpid() 254 kvm->arch.vmcs = vmcs; in kvm_init_vmcs() 319 vmcs = alloc_percpu(struct kvm_context); in kvm_loongarch_env_init() 320 if (!vmcs) { in kvm_loongarch_env_init() 327 free_percpu(vmcs); in kvm_loongarch_env_init() 328 vmcs = NULL; in kvm_loongarch_env_init() 343 free_percpu(vmcs); in kvm_loongarch_env_init() 344 vmcs = NULL; in kvm_loongarch_env_init() [all …]
|
/linux-6.8/arch/x86/kvm/vmx/ |
D | vmcs.h | 21 struct vmcs { struct 27 DECLARE_PER_CPU(struct vmcs *, current_vmcs); argument 30 * vmcs_host_state tracks registers that are loaded from the VMCS on VMEXIT 32 * used as a write-through cache of the corresponding VMCS fields. 57 * Track a VMCS that may be loaded on a certain CPU. If it is (cpu!=-1), also 62 struct vmcs *vmcs; member 63 struct vmcs *shadow_vmcs;
|
D | vmx_ops.h | 10 #include "vmcs.h" 15 void vmclear_error(struct vmcs *vmcs, u64 phys_addr); 16 void vmptrld_error(struct vmcs *vmcs, u64 phys_addr); 287 static inline void vmcs_clear(struct vmcs *vmcs) in vmcs_clear() argument 289 u64 phys_addr = __pa(vmcs); in vmcs_clear() 291 vmx_asm1(vmclear, "m"(phys_addr), vmcs, phys_addr); in vmcs_clear() 294 static inline void vmcs_load(struct vmcs *vmcs) in vmcs_load() argument 296 u64 phys_addr = __pa(vmcs); in vmcs_load() 301 vmx_asm1(vmptrld, "m"(phys_addr), vmcs, phys_addr); in vmcs_load()
|
D | vmx.h | 14 #include "vmcs.h" 122 /* The guest-physical address of the current VMCS L1 keeps for L2 */ 125 * Cache of the guest's VMCS, existing outside of guest memory. 131 * Cache of the guest's shadow VMCS, existing outside of guest 148 * Indicates if the shadow vmcs or enlightened vmcs must be updated 171 * vmcs02 has been written to the backing VMCS. Initialization 182 * Enlightened VMCS has been enabled. It does not mean that L1 has to 184 * on what the enlightened VMCS supports. 287 * loaded_vmcs points to the VMCS currently used in this vcpu. For a 289 * guest (L2), it points to a different VMCS. [all …]
|
D | vmcs12.h | 7 #include "vmcs.h" 12 * a VMCS structure, and vmcs12 is our emulated VMX's VMCS. This structure is 16 * nested_vmx_run() will use the data here to build the vmcs02: a VMCS for the 28 /* According to the Intel spec, a VMCS region must start with the 193 * VMPTRLD verifies that the VMCS region that L1 is loading contains this id. 202 * and any VMCS region. Although only sizeof(struct vmcs12) are used by the
|
D | vmx.c | 64 #include "vmcs.h" 458 noinline void vmclear_error(struct vmcs *vmcs, u64 phys_addr) in vmclear_error() argument 461 vmcs, phys_addr, vmcs_read32(VM_INSTRUCTION_ERROR)); in vmclear_error() 464 noinline void vmptrld_error(struct vmcs *vmcs, u64 phys_addr) in vmptrld_error() argument 467 vmcs, phys_addr, vmcs_read32(VM_INSTRUCTION_ERROR)); in vmptrld_error() 482 static DEFINE_PER_CPU(struct vmcs *, vmxarea); 483 DEFINE_PER_CPU(struct vmcs *, current_vmcs); 485 * We maintain a per-CPU linked-list of VMCS loaded on that CPU. This is needed 541 evmcs = (struct hv_enlightened_vmcs *)to_vmx(vcpu)->loaded_vmcs->vmcs; in hv_enable_l2_tlb_flush() 558 * Enlightened VMCS usage should be recommended and the host needs in hv_init_evmcs() [all …]
|
D | nested.c | 178 * We don't need to force sync to shadow VMCS because in nested_vmx_failValid() 179 * VM_INSTRUCTION_ERROR is not shadowed. Enlightened VMCS 'shadows' all in nested_vmx_failValid() 193 * failValid writes the error number to the current VMCS, which in nested_vmx_fail() 194 * can't be done if there isn't a current VMCS. in nested_vmx_fail() 254 * memory area pointer by vmptr as Enlightened VMCS (as there's no good in nested_evmcs_handle_vmclear() 294 static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs) in vmx_switch_vmcs() argument 300 if (WARN_ON_ONCE(vmx->loaded_vmcs == vmcs)) in vmx_switch_vmcs() 305 vmx->loaded_vmcs = vmcs; in vmx_switch_vmcs() 369 * Ensure that the current vmcs of the logical processor is the 489 * check. All VMCS fields involved are 32 bits, but Intel CPUs never in nested_vmx_is_exception_vmexit() [all …]
|
D | hyperv.c | 10 #include "vmcs.h" 32 * vmcs_version represents the range of supported Enlightened VMCS in nested_get_evmcs_version()
|
D | vmenter.S | 172 * resumes below at 'vmx_vmexit' due to the VMCS HOST_RIP setting. 313 * @field: VMCS field encoding that failed
|
D | hyperv_evmcs.h | 3 * This file contains common definitions for working with Enlightened VMCS which
|
/linux-6.8/Documentation/virt/kvm/x86/ |
D | nested-vmx.rst | 65 As a VMX implementation, nested VMX presents a VMCS structure to L1. 73 The name "vmcs12" refers to the VMCS that L1 builds for L2. In the code we 74 also have "vmcs01", the VMCS that L0 built for L1, and "vmcs02" is the VMCS 87 /* According to the Intel spec, a VMCS region must start with
|
/linux-6.8/tools/testing/selftests/kvm/lib/x86_64/ |
D | vmx.c | 85 /* Setup of a region of guest memory for a vmcs. */ in vcpu_alloc_vmx() 86 vmx->vmcs = (void *)vm_vaddr_alloc_page(vm); in vcpu_alloc_vmx() 87 vmx->vmcs_hva = addr_gva2hva(vm, (uintptr_t)vmx->vmcs); in vcpu_alloc_vmx() 88 vmx->vmcs_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->vmcs); in vcpu_alloc_vmx() 96 /* Setup of a region of guest memory for the shadow VMCS. */ in vcpu_alloc_vmx() 162 /* Load a VMCS. */ in load_vmcs() 163 *(uint32_t *)(vmx->vmcs) = vmcs_revision(); in load_vmcs() 170 /* Setup shadow VMCS, do not load it yet. */ in load_vmcs()
|
D | hyperv.c | 27 /* Setup of a region of guest memory for the enlightened VMCS. */ in vcpu_alloc_hyperv_test_pages()
|
D | memstress.c | 57 * structures such as the VMCS. in memstress_nested_pages()
|
/linux-6.8/tools/perf/util/intel-pt-decoder/ |
D | intel-pt-decoder.c | 124 struct intel_pt_vmcs_info *(*findnew_vmcs_info)(void *data, uint64_t vmcs); 167 uint64_t vmcs; member 2318 bool tsc, pip, vmcs, tma, psbend; member 2324 /* Lookahead and get the PIP, VMCS and TMA packets from PSB+ */ 2356 data->vmcs = true; in intel_pt_vm_psb_lookahead_cb() 2515 " VMCS %#" PRIx64 " TSC Offset %#" PRIx64 "\n", in intel_pt_translate_vm_tsc() 2516 payload, decoder->packet.payload, vmcs_info->vmcs, in intel_pt_translate_vm_tsc() 2524 .vmcs = NO_VMCS, in intel_pt_translate_vm_tsc_offset() 2543 p_log("VMCS: %#" PRIx64 " TSC Offset %#" PRIx64, in intel_pt_print_vmcs_info() 2544 vmcs_info->vmcs, vmcs_info->tsc_offset); in intel_pt_print_vmcs_info() [all …]
|
D | intel-pt-decoder.h | 210 uint64_t vmcs; member 280 struct intel_pt_vmcs_info *(*findnew_vmcs_info)(void *data, uint64_t vmcs);
|
/linux-6.8/tools/testing/selftests/kvm/x86_64/ |
D | vmx_set_nested_state_test.c | 139 * enlightened VMCS capability has been enabled. in test_vmx_nested_state() 210 * KVM_SET_NESTED_STATE succeeds with invalid VMCS in test_vmx_nested_state() 217 /* Invalid flags are rejected, even if no VMCS loaded. */ in test_vmx_nested_state()
|
D | hyperv_cpuid.c | 98 "Supported Enlightened VMCS version range is supposed to be 1:1" in test_hv_cpuid() 150 print_skip("Enlightened VMCS is unsupported"); in main()
|
D | vmx_close_while_nested_test.c | 40 /* Prepare the VMCS for L2 execution. */ in l1_guest_code()
|
D | vmx_invalid_nested_guest_state.c | 34 /* Prepare the VMCS for L2 execution. */ in l1_guest_code()
|
D | vmx_apic_access_test.c | 46 /* Prepare the VMCS for L2 execution. */ in l1_guest_code()
|
D | vmx_tsc_adjust_test.c | 89 /* Prepare the VMCS for L2 execution. */ in l1_guest_code()
|
D | vmx_nested_tsc_scaling_test.c | 93 /* prepare the VMCS for L2 execution */ in l1_guest_code()
|
/linux-6.8/tools/perf/Documentation/ |
D | perf-intel-pt.txt | 1373 ERROR: Unknown TSC Offset for VMCS 0x1bff6a 1374 VMCS: 0x1bff6a TSC Offset 0xffffe42722c64c41 1375 ERROR: Unknown TSC Offset for VMCS 0x1cbc08 1376 VMCS: 0x1cbc08 TSC Offset 0xffffe42722c64c41 1377 ERROR: Unknown TSC Offset for VMCS 0x1c3ce8 1378 VMCS: 0x1c3ce8 TSC Offset 0xffffe42722c64c41 1379 ERROR: Unknown TSC Offset for VMCS 0x1cbce9 1380 VMCS: 0x1cbce9 TSC Offset 0xffffe42722c64c41 1382 Each virtual CPU has a different Virtual Machine Control Structure (VMCS) 1392 [ dry-run ] [ <TSC Offset> [ : <VMCS> [ , <VMCS> ]... ] ]... [all …]
|
/linux-6.8/tools/perf/util/ |
D | intel-pt.c | 317 u64 vmcs, in intel_pt_findnew_vmcs() argument 328 if (v->vmcs == vmcs) in intel_pt_findnew_vmcs() 331 if (vmcs < v->vmcs) in intel_pt_findnew_vmcs() 339 v->vmcs = vmcs; in intel_pt_findnew_vmcs() 350 static struct intel_pt_vmcs_info *intel_pt_findnew_vmcs_info(void *data, uint64_t vmcs) in intel_pt_findnew_vmcs_info() argument 355 if (!vmcs && !pt->dflt_tsc_offset) in intel_pt_findnew_vmcs_info() 358 return intel_pt_findnew_vmcs(&pt->vmcs_info, vmcs, pt->dflt_tsc_offset); in intel_pt_findnew_vmcs_info() 4073 u64 tsc_offset, vmcs; in intel_pt_parse_vm_tm_corr_arg() local 4093 vmcs = strtoull(p, &p, 0); in intel_pt_parse_vm_tm_corr_arg() 4096 if (!vmcs) in intel_pt_parse_vm_tm_corr_arg() [all …]
|