/linux-6.1.9/tools/testing/selftests/kvm/lib/x86_64/ |
D | vmx.c | 78 struct vmx_pages *vmx = addr_gva2hva(vm, vmx_gva); in vcpu_alloc_vmx() local 81 vmx->vmxon = (void *)vm_vaddr_alloc_page(vm); in vcpu_alloc_vmx() 82 vmx->vmxon_hva = addr_gva2hva(vm, (uintptr_t)vmx->vmxon); in vcpu_alloc_vmx() 83 vmx->vmxon_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->vmxon); 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() 91 vmx->msr = (void *)vm_vaddr_alloc_page(vm); in vcpu_alloc_vmx() 92 vmx->msr_hva = addr_gva2hva(vm, (uintptr_t)vmx->msr); in vcpu_alloc_vmx() 93 vmx->msr_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->msr); in vcpu_alloc_vmx() [all …]
|
D | perf_test_util.c | 32 static void perf_test_l1_guest_code(struct vmx_pages *vmx, uint64_t vcpu_id) in perf_test_l1_guest_code() argument 38 GUEST_ASSERT(vmx->vmcs_gpa); in perf_test_l1_guest_code() 39 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in perf_test_l1_guest_code() 40 GUEST_ASSERT(load_vmcs(vmx)); in perf_test_l1_guest_code() 45 prepare_vmcs(vmx, perf_test_l2_guest_entry, rsp); in perf_test_l1_guest_code() 62 void perf_test_setup_ept(struct vmx_pages *vmx, struct kvm_vm *vm) in perf_test_setup_ept() argument 66 prepare_eptp(vmx, vm, 0); in perf_test_setup_ept() 73 nested_identity_map_1g(vmx, vm, 0, 0x100000000ULL); in perf_test_setup_ept() 77 nested_identity_map_1g(vmx, vm, start, end - start); in perf_test_setup_ept() 82 struct vmx_pages *vmx, *vmx0 = NULL; in perf_test_setup_nested() local [all …]
|
/linux-6.1.9/arch/x86/kvm/vmx/ |
D | vmx.c | 385 static __always_inline void vmx_disable_fb_clear(struct vcpu_vmx *vmx) in vmx_disable_fb_clear() argument 389 if (!vmx->disable_fb_clear) in vmx_disable_fb_clear() 396 vmx->msr_ia32_mcu_opt_ctrl = msr; in vmx_disable_fb_clear() 399 static __always_inline void vmx_enable_fb_clear(struct vcpu_vmx *vmx) in vmx_enable_fb_clear() argument 401 if (!vmx->disable_fb_clear) in vmx_enable_fb_clear() 404 vmx->msr_ia32_mcu_opt_ctrl &= ~FB_CLEAR_DIS; in vmx_enable_fb_clear() 405 native_wrmsrl(MSR_IA32_MCU_OPT_CTRL, vmx->msr_ia32_mcu_opt_ctrl); in vmx_enable_fb_clear() 408 static void vmx_update_fb_clear_dis(struct kvm_vcpu *vcpu, struct vcpu_vmx *vmx) in vmx_update_fb_clear_dis() argument 410 vmx->disable_fb_clear = vmx_fb_clear_ctrl_available; in vmx_update_fb_clear_dis() 423 vmx->disable_fb_clear = false; in vmx_update_fb_clear_dis() [all …]
|
D | nested.c | 189 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_vmx_fail() local 195 if (vmx->nested.current_vmptr == INVALID_GPA && in nested_vmx_fail() 196 !evmptr_is_valid(vmx->nested.hv_evmcs_vmptr)) in nested_vmx_fail() 219 static void vmx_disable_shadow_vmcs(struct vcpu_vmx *vmx) in vmx_disable_shadow_vmcs() argument 221 secondary_exec_controls_clearbit(vmx, SECONDARY_EXEC_SHADOW_VMCS); in vmx_disable_shadow_vmcs() 223 vmx->nested.need_vmcs12_to_shadow_sync = false; in vmx_disable_shadow_vmcs() 228 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_release_evmcs() local 230 if (evmptr_is_valid(vmx->nested.hv_evmcs_vmptr)) { in nested_release_evmcs() 231 kvm_vcpu_unmap(vcpu, &vmx->nested.hv_evmcs_map, true); in nested_release_evmcs() 232 vmx->nested.hv_evmcs = NULL; in nested_release_evmcs() [all …]
|
D | vmx.h | 394 void vmx_set_constant_host_state(struct vcpu_vmx *vmx); 407 void set_cr4_guest_host_mask(struct vcpu_vmx *vmx); 420 struct vmx_uret_msr *vmx_find_uret_msr(struct vcpu_vmx *vmx, u32 msr); 422 void vmx_update_host_rsp(struct vcpu_vmx *vmx, unsigned long host_rsp); 423 void vmx_spec_ctrl_restore_host(struct vcpu_vmx *vmx, unsigned int flags); 424 unsigned int __vmx_vcpu_run_flags(struct vcpu_vmx *vmx); 425 bool __vmx_vcpu_run(struct vcpu_vmx *vmx, unsigned long *regs, 595 static inline void lname##_controls_set(struct vcpu_vmx *vmx, u##bits val) \ 597 if (vmx->loaded_vmcs->controls_shadow.lname != val) { \ 599 vmx->loaded_vmcs->controls_shadow.lname = val; \ [all …]
|
D | posted_intr.c | 54 struct vcpu_vmx *vmx = to_vmx(vcpu); in vmx_vcpu_pi_load() local 91 list_del(&vmx->pi_wakeup_list); in vmx_vcpu_pi_load() 147 struct vcpu_vmx *vmx = to_vmx(vcpu); in pi_enable_wakeup_handler() local 154 list_add_tail(&vmx->pi_wakeup_list, in pi_enable_wakeup_handler() 221 struct vcpu_vmx *vmx; in pi_wakeup_handler() local 224 list_for_each_entry(vmx, wakeup_list, pi_wakeup_list) { in pi_wakeup_handler() 226 if (pi_test_on(&vmx->pi_desc)) in pi_wakeup_handler() 227 kvm_vcpu_wake_up(&vmx->vcpu); in pi_wakeup_handler()
|
D | nested.h | 56 struct vcpu_vmx *vmx = to_vmx(vcpu); in vmx_has_valid_vmcs12() local 59 return vmx->nested.current_vmptr != -1ull || in vmx_has_valid_vmcs12() 60 vmx->nested.hv_evmcs_vmptr != EVMPTR_INVALID; in vmx_has_valid_vmcs12() 65 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_get_vpid02() local 67 return vmx->nested.vpid02 ? vmx->nested.vpid02 : vmx->vpid; in nested_get_vpid02()
|
D | sgx.c | 291 struct vcpu_vmx *vmx = to_vmx(vcpu); in handle_encls_einit() local 323 vmx->msr_ia32_sgxlepubkeyhash, &trapnr); in handle_encls_einit() 418 struct vcpu_vmx *vmx = to_vmx(vcpu); in vcpu_setup_sgx_lepubkeyhash() local 420 memcpy(vmx->msr_ia32_sgxlepubkeyhash, sgx_pubkey_hash, in vcpu_setup_sgx_lepubkeyhash()
|
/linux-6.1.9/tools/testing/selftests/kvm/x86_64/ |
D | vmx_set_nested_state_test.c | 82 state->hdr.vmx.vmxon_pa = 0x1000; in set_default_vmx_state() 83 state->hdr.vmx.vmcs12_pa = 0x2000; in set_default_vmx_state() 84 state->hdr.vmx.smm.flags = 0; in set_default_vmx_state() 113 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state() 116 state->hdr.vmx.vmcs12_pa = -1ull; in test_vmx_nested_state() 133 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state() 134 state->hdr.vmx.vmcs12_pa = -1ull; in test_vmx_nested_state() 145 state->hdr.vmx.smm.flags = 1; in test_vmx_nested_state() 150 state->hdr.vmx.flags = ~0; in test_vmx_nested_state() 155 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state() [all …]
|
D | vmx_dirty_log_test.c | 48 void l1_guest_code(struct vmx_pages *vmx) in l1_guest_code() argument 53 GUEST_ASSERT(vmx->vmcs_gpa); in l1_guest_code() 54 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_guest_code() 55 GUEST_ASSERT(load_vmcs(vmx)); in l1_guest_code() 57 prepare_vmcs(vmx, l2_guest_code, in l1_guest_code() 70 struct vmx_pages *vmx; in main() local 84 vmx = vcpu_alloc_vmx(vm, &vmx_pages_gva); in main() 108 prepare_eptp(vmx, vm, 0); in main() 109 nested_map_memslot(vmx, vm, 0); in main() 110 nested_map(vmx, vm, NESTED_TEST_MEM1, GUEST_TEST_MEM, 4096); in main() [all …]
|
D | triple_fault_event_test.c | 27 void l1_guest_code_vmx(struct vmx_pages *vmx) in l1_guest_code_vmx() argument 30 GUEST_ASSERT(vmx->vmcs_gpa); in l1_guest_code_vmx() 31 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_guest_code_vmx() 32 GUEST_ASSERT(load_vmcs(vmx)); in l1_guest_code_vmx() 34 prepare_vmcs(vmx, l2_guest_code, in l1_guest_code_vmx()
|
D | vmx_apic_access_test.c | 77 struct vmx_pages *vmx; in main() local 89 vmx = vcpu_alloc_vmx(vm, &vmx_pages_gva); in main() 90 prepare_virtualize_apic_accesses(vmx, vm); in main()
|
D | nested_exceptions_test.c | 129 static void l1_vmx_code(struct vmx_pages *vmx) in l1_vmx_code() argument 133 GUEST_ASSERT_EQ(prepare_for_vmx_operation(vmx), true); in l1_vmx_code() 135 GUEST_ASSERT_EQ(load_vmcs(vmx), true); in l1_vmx_code() 137 prepare_vmcs(vmx, NULL, &l2_guest_stack[L2_GUEST_STACK_SIZE]); in l1_vmx_code()
|
/linux-6.1.9/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-vsx.h | 31 int validate_vmx(unsigned long vmx[][2], unsigned long *load) in validate_vmx() 37 if ((vmx[i][0] != load[64 + 2 * i]) || in validate_vmx() 38 (vmx[i][1] != load[65 + 2 * i])) { in validate_vmx() 40 i, vmx[i][0], 64 + 2 * i, in validate_vmx() 43 i, vmx[i][1], 65 + 2 * i, in validate_vmx() 51 if ((vmx[i][0] != load[65 + 2 * i]) || in validate_vmx() 52 (vmx[i][1] != load[64 + 2 * i])) { in validate_vmx() 54 i, vmx[i][0], 65 + 2 * i, in validate_vmx() 57 i, vmx[i][1], 64 + 2 * i, in validate_vmx() 109 unsigned long vmx[][2]) in load_vsx_vmx() [all …]
|
D | ptrace-tm-spd-vsx.c | 99 unsigned long vmx[VMX_MAX + 2][2]; in trace_tm_spd_vsx() local 104 FAIL_IF(show_vmx(child, vmx)); in trace_tm_spd_vsx() 105 FAIL_IF(validate_vmx(vmx, fp_load)); in trace_tm_spd_vsx() 108 FAIL_IF(show_vmx_ckpt(child, vmx)); in trace_tm_spd_vsx() 109 FAIL_IF(validate_vmx(vmx, fp_load_ckpt)); in trace_tm_spd_vsx() 112 memset(vmx, 0, sizeof(vmx)); in trace_tm_spd_vsx() 114 load_vsx_vmx(fp_load_ckpt_new, vsx, vmx); in trace_tm_spd_vsx() 117 FAIL_IF(write_vmx_ckpt(child, vmx)); in trace_tm_spd_vsx()
|
D | ptrace-tm-vsx.c | 87 unsigned long vmx[VMX_MAX + 2][2]; in trace_tm_vsx() local 92 FAIL_IF(show_vmx(child, vmx)); in trace_tm_vsx() 93 FAIL_IF(validate_vmx(vmx, fp_load)); in trace_tm_vsx() 96 FAIL_IF(show_vmx_ckpt(child, vmx)); in trace_tm_vsx() 97 FAIL_IF(validate_vmx(vmx, fp_load_ckpt)); in trace_tm_vsx() 99 memset(vmx, 0, sizeof(vmx)); in trace_tm_vsx() 101 load_vsx_vmx(fp_load_ckpt_new, vsx, vmx); in trace_tm_vsx() 104 FAIL_IF(write_vmx_ckpt(child, vmx)); in trace_tm_vsx()
|
D | ptrace-vsx.c | 40 unsigned long vmx[VMX_MAX + 2][2]; in trace_vsx() local 45 FAIL_IF(show_vmx(child, vmx)); in trace_vsx() 46 FAIL_IF(validate_vmx(vmx, fp_load)); in trace_vsx() 49 memset(vmx, 0, sizeof(vmx)); in trace_vsx() 50 load_vsx_vmx(fp_load_new, vsx, vmx); in trace_vsx() 53 FAIL_IF(write_vmx(child, vmx)); in trace_vsx()
|
D | ptrace.h | 597 int show_vmx(pid_t child, unsigned long vmx[][2]) in show_vmx() 601 ret = ptrace(PTRACE_GETVRREGS, child, 0, vmx); in show_vmx() 609 int show_vmx_ckpt(pid_t child, unsigned long vmx[][2]) in show_vmx_ckpt() 622 memcpy(vmx, regs, sizeof(regs)); in show_vmx_ckpt() 627 int write_vmx(pid_t child, unsigned long vmx[][2]) in write_vmx() 631 ret = ptrace(PTRACE_SETVRREGS, child, 0, vmx); in write_vmx() 639 int write_vmx_ckpt(pid_t child, unsigned long vmx[][2]) in write_vmx_ckpt() 645 memcpy(regs, vmx, sizeof(regs)); in write_vmx_ckpt()
|
/linux-6.1.9/arch/x86/kvm/ |
D | Makefile | 24 kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \ 25 vmx/evmcs.o vmx/nested.o vmx/posted_intr.o 26 kvm-intel-$(CONFIG_X86_SGX_KVM) += vmx/sgx.o 42 $(obj)/vmx/vmenter.o: $(obj)/kvm-asm-offsets.h
|
/linux-6.1.9/tools/testing/selftests/kvm/include/x86_64/ |
D | vmx.h | 561 bool prepare_for_vmx_operation(struct vmx_pages *vmx); 562 void prepare_vmcs(struct vmx_pages *vmx, void *guest_rip, void *guest_rsp); 563 bool load_vmcs(struct vmx_pages *vmx); 567 void nested_pg_map(struct vmx_pages *vmx, struct kvm_vm *vm, 569 void nested_map(struct vmx_pages *vmx, struct kvm_vm *vm, 571 void nested_map_memslot(struct vmx_pages *vmx, struct kvm_vm *vm, 573 void nested_identity_map_1g(struct vmx_pages *vmx, struct kvm_vm *vm, 576 void prepare_eptp(struct vmx_pages *vmx, struct kvm_vm *vm, 578 void prepare_virtualize_apic_accesses(struct vmx_pages *vmx, struct kvm_vm *vm);
|
/linux-6.1.9/drivers/crypto/vmx/ |
D | Makefile | 2 obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o 3 vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
|
D | Kconfig | 14 choose 'M' here, this module will be called vmx-crypto.
|
/linux-6.1.9/tools/testing/selftests/powerpc/tm/ |
D | Makefile | 3 tm-signal-context-chk-vmx tm-signal-context-chk-vsx 6 tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \ 22 $(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
|
D | .gitignore | 13 tm-signal-context-chk-vmx 18 tm-vmx-unavail
|
/linux-6.1.9/Documentation/virt/kvm/x86/ |
D | index.rst | 16 nested-vmx
|