Home
last modified time | relevance | path

Searched full:vmcs (Results 1 – 25 of 48) sorted by relevance

12

/linux-6.15/arch/loongarch/kvm/
Dmain.c19 static struct kvm_context __percpu *vmcs; variable
202 context = per_cpu_ptr(vcpu->kvm->arch.vmcs, cpu); in kvm_update_vpid()
231 context = per_cpu_ptr(vcpu->kvm->arch.vmcs, cpu); in kvm_check_vpid()
275 kvm->arch.vmcs = vmcs; in kvm_init_vmcs()
325 this_cpu_ptr(vmcs)->last_vcpu = NULL; in kvm_arch_enable_virtualization_cpu()
347 vmcs = alloc_percpu(struct kvm_context); in kvm_loongarch_env_init()
348 if (!vmcs) { in kvm_loongarch_env_init()
355 free_percpu(vmcs); in kvm_loongarch_env_init()
356 vmcs = NULL; in kvm_loongarch_env_init()
371 free_percpu(vmcs); in kvm_loongarch_env_init()
[all …]
/linux-6.15/arch/x86/kvm/vmx/
Dvmx_ops.h10 #include "vmcs.h"
15 void vmclear_error(struct vmcs *vmcs, u64 phys_addr);
16 void vmptrld_error(struct vmcs *vmcs, u64 phys_addr);
289 static inline void vmcs_clear(struct vmcs *vmcs) in vmcs_clear() argument
291 u64 phys_addr = __pa(vmcs); in vmcs_clear()
293 vmx_asm1(vmclear, "m"(phys_addr), vmcs, phys_addr); in vmcs_clear()
296 static inline void vmcs_load(struct vmcs *vmcs) in vmcs_load() argument
298 u64 phys_addr = __pa(vmcs); in vmcs_load()
303 vmx_asm1(vmptrld, "m"(phys_addr), vmcs, phys_addr); in vmcs_load()
Dvmcs.h21 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;
Dvmx.h14 #include "vmcs.h"
121 /* The guest-physical address of the current VMCS L1 keeps for L2 */
124 * Cache of the guest's VMCS, existing outside of guest memory.
130 * Cache of the guest's shadow VMCS, existing outside of guest
147 * Indicates if the shadow vmcs or enlightened vmcs must be updated
170 * 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.
285 * loaded_vmcs points to the VMCS currently used in this vcpu. For a
287 * guest (L2), it points to a different VMCS.
[all …]
Dvmcs12.h7 #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 * ID during nested VMPTRLD to verify that L1 is loading a VMCS that adhere's
203 * and any VMCS region. Although only sizeof(struct vmcs12) are used by the
Dvmx.c67 #include "vmcs.h"
468 noinline void vmclear_error(struct vmcs *vmcs, u64 phys_addr) in vmclear_error() argument
471 vmcs, phys_addr, vmcs_read32(VM_INSTRUCTION_ERROR)); in vmclear_error()
474 noinline void vmptrld_error(struct vmcs *vmcs, u64 phys_addr) in vmptrld_error() argument
477 vmcs, phys_addr, vmcs_read32(VM_INSTRUCTION_ERROR)); in vmptrld_error()
491 static DEFINE_PER_CPU(struct vmcs *, vmxarea);
492 DEFINE_PER_CPU(struct vmcs *, current_vmcs);
494 * We maintain a per-CPU linked-list of VMCS loaded on that CPU. This is needed
544 evmcs = (struct hv_enlightened_vmcs *)to_vmx(vcpu)->loaded_vmcs->vmcs; in hv_enable_l2_tlb_flush()
561 * Enlightened VMCS usage should be recommended and the host needs in hv_init_evmcs()
[all …]
Dnested.c179 * We don't need to force sync to shadow VMCS because in nested_vmx_failValid()
180 * VM_INSTRUCTION_ERROR is not shadowed. Enlightened VMCS 'shadows' all in nested_vmx_failValid()
194 * failValid writes the error number to the current VMCS, which in nested_vmx_fail()
195 * can't be done if there isn't a current VMCS. in nested_vmx_fail()
252 * memory area pointer by vmptr as Enlightened VMCS (as there's no good in nested_evmcs_handle_vmclear()
292 static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs) in vmx_switch_vmcs() argument
298 if (WARN_ON_ONCE(vmx->loaded_vmcs == vmcs)) in vmx_switch_vmcs()
303 vmx->loaded_vmcs = vmcs; in vmx_switch_vmcs()
370 * Ensure that the current vmcs of the logical processor is the
512 * check. All VMCS fields involved are 32 bits, but Intel CPUs never in nested_vmx_is_exception_vmexit()
[all …]
Dhyperv.c11 #include "vmcs.h"
33 * vmcs_version represents the range of supported Enlightened VMCS in nested_get_evmcs_version()
Dvmenter.S172 * resumes below at 'vmx_vmexit' due to the VMCS HOST_RIP setting.
315 * @field: VMCS field encoding that failed
Dhyperv_evmcs.h3 * This file contains common definitions for working with Enlightened VMCS which
/linux-6.15/Documentation/virt/kvm/x86/
Dnested-vmx.rst65 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
Derrata.rst41 injection through the VMCS correctly set the "error code valid" flag, e.g.
/linux-6.15/tools/testing/selftests/kvm/lib/x86/
Dvmx.c83 /* Setup of a region of guest memory for a vmcs. */ in vcpu_alloc_vmx()
84 vmx->vmcs = (void *)vm_vaddr_alloc_page(vm); in vcpu_alloc_vmx()
85 vmx->vmcs_hva = addr_gva2hva(vm, (uintptr_t)vmx->vmcs); in vcpu_alloc_vmx()
86 vmx->vmcs_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->vmcs); in vcpu_alloc_vmx()
94 /* Setup of a region of guest memory for the shadow VMCS. */ in vcpu_alloc_vmx()
160 /* Load a VMCS. */ in load_vmcs()
161 *(uint32_t *)(vmx->vmcs) = vmcs_revision(); in load_vmcs()
168 /* Setup shadow VMCS, do not load it yet. */ in load_vmcs()
Dmemstress.c57 * structures such as the VMCS. in memstress_nested_pages()
Dhyperv.c94 /* Setup of a region of guest memory for the enlightened VMCS. */ in vcpu_alloc_hyperv_test_pages()
/linux-6.15/tools/perf/util/intel-pt-decoder/
Dintel-pt-decoder.c124 struct intel_pt_vmcs_info *(*findnew_vmcs_info)(void *data, uint64_t vmcs);
167 uint64_t vmcs; member
2320 bool tsc, pip, vmcs, tma, psbend; member
2326 /* Lookahead and get the PIP, VMCS and TMA packets from PSB+ */
2358 data->vmcs = true; in intel_pt_vm_psb_lookahead_cb()
2517 " VMCS %#" PRIx64 " TSC Offset %#" PRIx64 "\n", in intel_pt_translate_vm_tsc()
2518 payload, decoder->packet.payload, vmcs_info->vmcs, in intel_pt_translate_vm_tsc()
2526 .vmcs = NO_VMCS, in intel_pt_translate_vm_tsc_offset()
2545 p_log("VMCS: %#" PRIx64 " TSC Offset %#" PRIx64, in intel_pt_print_vmcs_info()
2546 vmcs_info->vmcs, vmcs_info->tsc_offset); in intel_pt_print_vmcs_info()
[all …]
Dintel-pt-decoder.h210 uint64_t vmcs; member
280 struct intel_pt_vmcs_info *(*findnew_vmcs_info)(void *data, uint64_t vmcs);
/linux-6.15/tools/testing/selftests/kvm/x86/
Dvmx_set_nested_state_test.c139 * 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()
Dhyperv_cpuid.c109 "Supported Enlightened VMCS version range is supposed to be 1:1" in test_hv_cpuid()
169 print_skip("Enlightened VMCS is unsupported"); in main()
Dvmx_close_while_nested_test.c40 /* Prepare the VMCS for L2 execution. */ in l1_guest_code()
Dvmx_invalid_nested_guest_state.c34 /* Prepare the VMCS for L2 execution. */ in l1_guest_code()
Dvmx_apic_access_test.c46 /* Prepare the VMCS for L2 execution. */ in l1_guest_code()
Dvmx_tsc_adjust_test.c89 /* Prepare the VMCS for L2 execution. */ in l1_guest_code()
/linux-6.15/tools/perf/Documentation/
Dperf-intel-pt.txt1431 ERROR: Unknown TSC Offset for VMCS 0x1bff6a
1432 VMCS: 0x1bff6a TSC Offset 0xffffe42722c64c41
1433 ERROR: Unknown TSC Offset for VMCS 0x1cbc08
1434 VMCS: 0x1cbc08 TSC Offset 0xffffe42722c64c41
1435 ERROR: Unknown TSC Offset for VMCS 0x1c3ce8
1436 VMCS: 0x1c3ce8 TSC Offset 0xffffe42722c64c41
1437 ERROR: Unknown TSC Offset for VMCS 0x1cbce9
1438 VMCS: 0x1cbce9 TSC Offset 0xffffe42722c64c41
1440 Each virtual CPU has a different Virtual Machine Control Structure (VMCS)
1450 [ dry-run ] [ <TSC Offset> [ : <VMCS> [ , <VMCS> ]... ] ]...
[all …]
/linux-6.15/tools/perf/util/
Dintel-pt.c317 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()
4105 u64 tsc_offset, vmcs; in intel_pt_parse_vm_tm_corr_arg() local
4125 vmcs = strtoull(p, &p, 0); in intel_pt_parse_vm_tm_corr_arg()
4128 if (!vmcs) in intel_pt_parse_vm_tm_corr_arg()
[all …]

12