| /Linux-v5.4/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(vm, getpagesize(), 0x10000, 0, 0); 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(vm, getpagesize(), 0x10000, 0, 0); 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(vm, getpagesize(), 0x10000, 0, 0); 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 …]
|
| /Linux-v5.4/arch/x86/kvm/vmx/ |
| D | vmx.c | 621 static inline int __find_msr_index(struct vcpu_vmx *vmx, u32 msr) in __find_msr_index() argument 625 for (i = 0; i < vmx->nmsrs; ++i) in __find_msr_index() 626 if (vmx_msr_index[vmx->guest_msrs[i].index] == msr) in __find_msr_index() 631 struct shared_msr_entry *find_msr_entry(struct vcpu_vmx *vmx, u32 msr) in find_msr_entry() argument 635 i = __find_msr_index(vmx, msr); in find_msr_entry() 637 return &vmx->guest_msrs[i]; in find_msr_entry() 723 static bool vmx_segment_cache_test_set(struct vcpu_vmx *vmx, unsigned seg, in vmx_segment_cache_test_set() argument 729 if (!(vmx->vcpu.arch.regs_avail & (1 << VCPU_EXREG_SEGMENTS))) { in vmx_segment_cache_test_set() 730 vmx->vcpu.arch.regs_avail |= (1 << VCPU_EXREG_SEGMENTS); in vmx_segment_cache_test_set() 731 vmx->segment_cache.bitmask = 0; in vmx_segment_cache_test_set() [all …]
|
| D | nested.c | 173 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_vmx_failValid() local 179 if (vmx->nested.current_vmptr == -1ull && !vmx->nested.hv_evmcs) in nested_vmx_failValid() 211 static void vmx_disable_shadow_vmcs(struct vcpu_vmx *vmx) in vmx_disable_shadow_vmcs() argument 213 secondary_exec_controls_clearbit(vmx, SECONDARY_EXEC_SHADOW_VMCS); in vmx_disable_shadow_vmcs() 215 vmx->nested.need_vmcs12_to_shadow_sync = false; in vmx_disable_shadow_vmcs() 220 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_release_evmcs() local 222 if (!vmx->nested.hv_evmcs) in nested_release_evmcs() 225 kvm_vcpu_unmap(vcpu, &vmx->nested.hv_evmcs_map, true); in nested_release_evmcs() 226 vmx->nested.hv_evmcs_vmptr = -1ull; in nested_release_evmcs() 227 vmx->nested.hv_evmcs = NULL; in nested_release_evmcs() [all …]
|
| D | vmx.h | 311 void vmx_set_constant_host_state(struct vcpu_vmx *vmx); 324 void set_cr4_guest_host_mask(struct vcpu_vmx *vmx); 334 struct shared_msr_entry *find_msr_entry(struct vcpu_vmx *vmx, u32 msr); 335 void pt_update_intercept_for_msr(struct vcpu_vmx *vmx); 336 void vmx_update_host_rsp(struct vcpu_vmx *vmx, unsigned long host_rsp); 405 static inline void lname##_controls_set(struct vcpu_vmx *vmx, u32 val) \ 407 if (vmx->loaded_vmcs->controls_shadow.lname != val) { \ 409 vmx->loaded_vmcs->controls_shadow.lname = val; \ 412 static inline u32 lname##_controls_get(struct vcpu_vmx *vmx) \ 414 return vmx->loaded_vmcs->controls_shadow.lname; \ [all …]
|
| D | evmcs.c | 336 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_get_evmcs_version() local 343 if (vmx->nested.enlightened_vmcs_enabled) in nested_get_evmcs_version() 352 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_enable_evmcs() local 353 bool evmcs_already_enabled = vmx->nested.enlightened_vmcs_enabled; in nested_enable_evmcs() 355 vmx->nested.enlightened_vmcs_enabled = true; in nested_enable_evmcs() 364 vmx->nested.msrs.pinbased_ctls_high &= ~EVMCS1_UNSUPPORTED_PINCTRL; in nested_enable_evmcs() 365 vmx->nested.msrs.entry_ctls_high &= ~EVMCS1_UNSUPPORTED_VMENTRY_CTRL; in nested_enable_evmcs() 366 vmx->nested.msrs.exit_ctls_high &= ~EVMCS1_UNSUPPORTED_VMEXIT_CTRL; in nested_enable_evmcs() 367 vmx->nested.msrs.secondary_ctls_high &= ~EVMCS1_UNSUPPORTED_2NDEXEC; in nested_enable_evmcs() 368 vmx->nested.msrs.vmfunc_controls &= ~EVMCS1_UNSUPPORTED_VMFUNC; in nested_enable_evmcs()
|
| D | nested.h | 49 struct vcpu_vmx *vmx = to_vmx(vcpu); in vmx_has_valid_vmcs12() local 57 return is_guest_mode(vcpu) || vmx->nested.current_vmptr != -1ull || in vmx_has_valid_vmcs12() 58 vmx->nested.hv_evmcs; in vmx_has_valid_vmcs12()
|
| /Linux-v5.4/tools/testing/selftests/kvm/x86_64/ |
| D | vmx_set_nested_state_test.c | 85 state->hdr.vmx.vmxon_pa = 0x1000; in set_default_vmx_state() 86 state->hdr.vmx.vmcs12_pa = 0x2000; in set_default_vmx_state() 87 state->hdr.vmx.smm.flags = 0; in set_default_vmx_state() 116 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state() 119 state->hdr.vmx.vmcs12_pa = -1ull; in test_vmx_nested_state() 136 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state() 137 state->hdr.vmx.vmcs12_pa = -1ull; in test_vmx_nested_state() 148 state->hdr.vmx.smm.flags = 1; in test_vmx_nested_state() 153 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state() 159 state->hdr.vmx.vmxon_pa = 1; in test_vmx_nested_state() [all …]
|
| D | vmx_dirty_log_test.c | 50 void l1_guest_code(struct vmx_pages *vmx) in l1_guest_code() argument 55 GUEST_ASSERT(vmx->vmcs_gpa); in l1_guest_code() 56 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_guest_code() 57 GUEST_ASSERT(load_vmcs(vmx)); in l1_guest_code() 59 prepare_vmcs(vmx, l2_guest_code, in l1_guest_code() 72 struct vmx_pages *vmx; in main() local 86 vmx = vcpu_alloc_vmx(vm, &vmx_pages_gva); in main() 111 prepare_eptp(vmx, vm, 0); in main() 112 nested_map_memslot(vmx, vm, 0, 0); in main() 113 nested_map(vmx, vm, NESTED_TEST_MEM1, GUEST_TEST_MEM, 4096, 0); in main() [all …]
|
| /Linux-v5.4/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-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-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-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 | 529 int show_vmx(pid_t child, unsigned long vmx[][2]) in show_vmx() 533 ret = ptrace(PTRACE_GETVRREGS, child, 0, vmx); in show_vmx() 541 int show_vmx_ckpt(pid_t child, unsigned long vmx[][2]) in show_vmx_ckpt() 554 memcpy(vmx, regs, sizeof(regs)); in show_vmx_ckpt() 559 int write_vmx(pid_t child, unsigned long vmx[][2]) in write_vmx() 563 ret = ptrace(PTRACE_SETVRREGS, child, 0, vmx); in write_vmx() 571 int write_vmx_ckpt(pid_t child, unsigned long vmx[][2]) in write_vmx_ckpt() 577 memcpy(regs, vmx, sizeof(regs)); in write_vmx_ckpt()
|
| /Linux-v5.4/arch/x86/kvm/ |
| D | Makefile | 15 kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o vmx/evmcs.o vmx/nested.o
|
| /Linux-v5.4/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 | 10 choose 'M' here, this module will be called vmx-crypto.
|
| /Linux-v5.4/tools/testing/selftests/kvm/include/x86_64/ |
| D | vmx.h | 579 bool prepare_for_vmx_operation(struct vmx_pages *vmx); 580 void prepare_vmcs(struct vmx_pages *vmx, void *guest_rip, void *guest_rsp); 581 bool load_vmcs(struct vmx_pages *vmx); 585 void nested_pg_map(struct vmx_pages *vmx, struct kvm_vm *vm, 587 void nested_map(struct vmx_pages *vmx, struct kvm_vm *vm, 590 void nested_map_memslot(struct vmx_pages *vmx, struct kvm_vm *vm, 592 void prepare_eptp(struct vmx_pages *vmx, struct kvm_vm *vm,
|
| /Linux-v5.4/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 \ 20 $(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
|
| D | .gitignore | 12 tm-signal-context-chk-vmx 16 tm-vmx-unavail
|
| /Linux-v5.4/Documentation/virt/kvm/ |
| D | nested-vmx.txt | 46 -cpu qemu64,+vmx (add just the vmx feature to a named CPU type) 66 internals of this structure; This is struct vmcs12 from arch/x86/kvm/vmx.c. 75 VMCS12_REVISION (from vmx.c) should be changed if struct vmcs12 or its inner
|
| /Linux-v5.4/arch/x86/events/intel/ |
| D | pt.h | 46 bool vmx; member
|
| /Linux-v5.4/arch/x86/include/uapi/asm/ |
| D | kvm.h | 420 struct kvm_vmx_nested_state_hdr vmx; member 432 struct kvm_vmx_nested_state_data vmx[0]; member
|
| /Linux-v5.4/tools/arch/x86/include/uapi/asm/ |
| D | kvm.h | 420 struct kvm_vmx_nested_state_hdr vmx; member 432 struct kvm_vmx_nested_state_data vmx[0]; member
|
| /Linux-v5.4/arch/powerpc/lib/ |
| D | Makefile | 45 obj64-$(CONFIG_ALTIVEC) += vmx-helper.o
|
| /Linux-v5.4/drivers/crypto/ |
| D | Makefile | 46 obj-$(CONFIG_CRYPTO_DEV_VMX) += vmx/
|