Home
last modified time | relevance | path

Searched refs:vmx (Results 1 – 25 of 44) sorted by relevance

12

/linux-6.15/tools/testing/selftests/kvm/lib/x86/
H A Dvmx.c80 vmx->vmxon_hva = addr_gva2hva(vm, (uintptr_t)vmx->vmxon); in vcpu_alloc_vmx()
81 vmx->vmxon_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->vmxon); 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()
90 vmx->msr_hva = addr_gva2hva(vm, (uintptr_t)vmx->msr); in vcpu_alloc_vmx()
91 vmx->msr_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->msr); in vcpu_alloc_vmx()
101 vmx->vmread_hva = addr_gva2hva(vm, (uintptr_t)vmx->vmread); in vcpu_alloc_vmx()
102 vmx->vmread_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->vmread); in vcpu_alloc_vmx()
111 return vmx; in vcpu_alloc_vmx()
543 vmx->eptp_hva = addr_gva2hva(vm, (uintptr_t)vmx->eptp); in prepare_eptp()
[all …]
H A Dmemstress.c38 GUEST_ASSERT(vmx->vmcs_gpa); in memstress_l1_guest_code()
39 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in memstress_l1_guest_code()
40 GUEST_ASSERT(load_vmcs(vmx)); in memstress_l1_guest_code()
66 prepare_eptp(vmx, vm, 0); in memstress_setup_ept()
82 struct vmx_pages *vmx, *vmx0 = NULL; in memstress_setup_nested() local
91 vmx = vcpu_alloc_vmx(vm, &vmx_gva); in memstress_setup_nested()
94 memstress_setup_ept(vmx, vm); in memstress_setup_nested()
95 vmx0 = vmx; in memstress_setup_nested()
98 vmx->eptp = vmx0->eptp; in memstress_setup_nested()
99 vmx->eptp_hva = vmx0->eptp_hva; in memstress_setup_nested()
[all …]
/linux-6.15/arch/x86/kvm/vmx/
H A Dvmx.c1912 vmx_setup_uret_msr(vmx, MSR_EFER, update_transition_efer(vmx)); in vmx_setup_uret_msrs()
4483 pin_controls_set(vmx, vmx_pin_based_exec_ctrl(vmx)); in vmx_refresh_apicv_exec_ctrl()
4758 pin_controls_set(vmx, vmx_pin_based_exec_ctrl(vmx)); in init_vmcs()
4760 exec_controls_set(vmx, vmx_exec_control(vmx)); in init_vmcs()
4844 memset(&vmx->pt_desc, 0, sizeof(vmx->pt_desc)); in init_vmcs()
4870 init_vmcs(vmx); in __vmx_vcpu_reset()
7033 memset(vmx->pi_desc.pir, 0, sizeof(vmx->pi_desc.pir)); in vmx_apicv_pre_state_restore()
7229 __vmx_complete_interrupts(&vmx->vcpu, vmx->idt_vectoring_info, in vmx_complete_interrupts()
7422 vmx->fail = 0; in vmx_vcpu_run()
7646 vmx->loaded_vmcs = &vmx->vmcs01; in vmx_vcpu_create()
[all …]
H A Dnested.c335 if (WARN_ON_ONCE(vmx->loaded_vmcs != &vmx->vmcs01)) in free_nested()
338 if (!vmx->nested.vmxon && !vmx->nested.smm.vmxon) in free_nested()
2110 vmx->nested.hv_evmcs = vmx->nested.hv_evmcs_map.hva; in nested_vmx_handle_enlightened_vmptrld()
3550 prepare_vmcs02_early(vmx, &vmx->vmcs01, vmcs12); in nested_vmx_enter_non_root_mode()
4099 if (vmx->nested.pi_pending && vmx->nested.pi_desc && in vmx_has_nested_events()
4519 WARN_ON_ONCE(vmx->loaded_vmcs != &vmx->vmcs01); in copy_vmcs02_to_vmcs12_rare()
4522 vmx->loaded_vmcs = &vmx->nested.vmcs02; in copy_vmcs02_to_vmcs12_rare()
4527 vmx->loaded_vmcs = &vmx->vmcs01; in copy_vmcs02_to_vmcs12_rare()
6649 (vmx->nested.vmxon || vmx->nested.smm.vmxon)) { in vmx_get_nested_state()
6650 kvm_state.hdr.vmx.vmxon_pa = vmx->nested.vmxon_ptr; in vmx_get_nested_state()
[all …]
H A Dhyperv.h25 static inline bool nested_vmx_is_evmptr12_valid(struct vcpu_vmx *vmx) in nested_vmx_is_evmptr12_valid() argument
27 return evmptr_is_valid(vmx->nested.hv_evmcs_vmptr); in nested_vmx_is_evmptr12_valid()
35 static inline bool nested_vmx_is_evmptr12_set(struct vcpu_vmx *vmx) in nested_vmx_is_evmptr12_set() argument
37 return evmptr_is_set(vmx->nested.hv_evmcs_vmptr); in nested_vmx_is_evmptr12_set()
40 static inline struct hv_enlightened_vmcs *nested_vmx_evmcs(struct vcpu_vmx *vmx) in nested_vmx_evmcs() argument
42 return vmx->nested.hv_evmcs; in nested_vmx_evmcs()
69 static inline bool nested_vmx_is_evmptr12_valid(struct vcpu_vmx *vmx) in nested_vmx_is_evmptr12_valid() argument
79 static inline bool nested_vmx_is_evmptr12_set(struct vcpu_vmx *vmx) in nested_vmx_is_evmptr12_set() argument
84 static inline struct hv_enlightened_vmcs *nested_vmx_evmcs(struct vcpu_vmx *vmx) in nested_vmx_evmcs() argument
H A Dvmx.h383 void vmx_set_constant_host_state(struct vcpu_vmx *vmx);
397 void set_cr4_guest_host_mask(struct vcpu_vmx *vmx);
593 vmx->loaded_vmcs->controls_shadow.lname = val; \
607 lname##_controls_set(vmx, lname##_controls_get(vmx) | val); \
612 lname##_controls_set(vmx, lname##_controls_get(vmx) & ~val); \
686 struct vcpu_vmx *vmx = to_vmx(vcpu); in vmx_get_exit_qual() local
691 return vmx->exit_qualification; in vmx_get_exit_qual()
696 struct vcpu_vmx *vmx = to_vmx(vcpu); in vmx_get_intr_info() local
701 return vmx->exit_intr_info; in vmx_get_intr_info()
718 return secondary_exec_controls_get(vmx) & in vmx_has_waitpkg()
[all …]
H A Dposted_intr.c58 struct vcpu_vmx *vmx = to_vmx(vcpu); in vmx_vcpu_pi_load() local
105 list_del(&vmx->pi_wakeup_list); in vmx_vcpu_pi_load()
162 struct vcpu_vmx *vmx = to_vmx(vcpu); in pi_enable_wakeup_handler() local
181 list_add_tail(&vmx->pi_wakeup_list, in pi_enable_wakeup_handler()
246 struct vcpu_vmx *vmx; in pi_wakeup_handler() local
249 list_for_each_entry(vmx, wakeup_list, pi_wakeup_list) { in pi_wakeup_handler()
251 if (pi_test_on(&vmx->pi_desc)) in pi_wakeup_handler()
252 kvm_vcpu_wake_up(&vmx->vcpu); in pi_wakeup_handler()
H A Dnested.h81 struct vcpu_vmx *vmx = to_vmx(vcpu); in vmx_has_valid_vmcs12() local
84 return vmx->nested.current_vmptr != -1ull || in vmx_has_valid_vmcs12()
85 nested_vmx_is_evmptr12_set(vmx); in vmx_has_valid_vmcs12()
90 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_get_vpid02() local
92 return vmx->nested.vpid02 ? vmx->nested.vpid02 : vmx->vpid; in nested_get_vpid02()
H A Dhyperv.c202 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_enable_evmcs() local
204 vmx->nested.enlightened_vmcs_enabled = true; in nested_enable_evmcs()
215 struct vcpu_vmx *vmx = to_vmx(vcpu); in nested_evmcs_l2_tlb_flush_enabled() local
216 struct hv_enlightened_vmcs *evmcs = vmx->nested.hv_evmcs; in nested_evmcs_l2_tlb_flush_enabled()
/linux-6.15/tools/testing/selftests/kvm/x86/
H A Dvmx_set_nested_state_test.c82 state->hdr.vmx.vmxon_pa = 0x1000; 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()
149 state->hdr.vmx.smm.flags = 1; in test_vmx_nested_state()
154 state->hdr.vmx.flags = ~0; in test_vmx_nested_state()
165 state->hdr.vmx.vmxon_pa = 1; in test_vmx_nested_state()
206 state->hdr.vmx.vmcs12_pa = -1; in test_vmx_nested_state()
221 state->hdr.vmx.vmcs12_pa = -1; in test_vmx_nested_state()
222 state->hdr.vmx.flags = ~0; in test_vmx_nested_state()
227 state->hdr.vmx.vmxon_pa = 0; in test_vmx_nested_state()
[all …]
H A Dvmx_dirty_log_test.c56 void l1_guest_code(struct vmx_pages *vmx) in l1_guest_code() argument
62 GUEST_ASSERT(vmx->vmcs_gpa); in l1_guest_code()
63 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_guest_code()
64 GUEST_ASSERT(load_vmcs(vmx)); in l1_guest_code()
66 if (vmx->eptp_gpa) in l1_guest_code()
83 struct vmx_pages *vmx; in test_vmx_dirty_log() local
96 vmx = vcpu_alloc_vmx(vm, &vmx_pages_gva); in test_vmx_dirty_log()
123 prepare_eptp(vmx, vm, 0); in test_vmx_dirty_log()
124 nested_map_memslot(vmx, vm, 0); in test_vmx_dirty_log()
125 nested_map(vmx, vm, NESTED_TEST_MEM1, GUEST_TEST_MEM, 4096); in test_vmx_dirty_log()
[all …]
H A Dtriple_fault_event_test.c27 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()
H A Dvmx_apic_access_test.c77 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()
H A Dnested_exceptions_test.c129 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.15/arch/x86/kvm/
H A DMakefile18 kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \
19 vmx/nested.o vmx/posted_intr.o vmx/main.o
21 kvm-intel-$(CONFIG_X86_SGX_KVM) += vmx/sgx.o
22 kvm-intel-$(CONFIG_KVM_HYPERV) += vmx/hyperv.o vmx/hyperv_evmcs.o
31 kvm-intel-y += vmx/vmx_onhyperv.o vmx/hyperv_evmcs.o
43 $(obj)/vmx/vmenter.o: $(obj)/kvm-asm-offsets.h
/linux-6.15/tools/testing/selftests/powerpc/ptrace/
H A Dptrace-vsx.h37 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()
117 vmx[i][0] = load[64 + 2 * i]; in load_vsx_vmx()
[all …]
H A Dptrace-tm-vsx.c87 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()
H A Dptrace-tm-spd-vsx.c99 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()
H A Dptrace-vsx.c40 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()
H A Dptrace.h597 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.15/tools/testing/selftests/kvm/include/x86/
H A Dvmx.h556 bool prepare_for_vmx_operation(struct vmx_pages *vmx);
557 void prepare_vmcs(struct vmx_pages *vmx, void *guest_rip, void *guest_rsp);
558 bool load_vmcs(struct vmx_pages *vmx);
562 void nested_pg_map(struct vmx_pages *vmx, struct kvm_vm *vm,
564 void nested_map(struct vmx_pages *vmx, struct kvm_vm *vm,
566 void nested_map_memslot(struct vmx_pages *vmx, struct kvm_vm *vm,
568 void nested_identity_map_1g(struct vmx_pages *vmx, struct kvm_vm *vm,
571 void prepare_eptp(struct vmx_pages *vmx, struct kvm_vm *vm,
573 void prepare_virtualize_apic_accesses(struct vmx_pages *vmx, struct kvm_vm *vm);
/linux-6.15/tools/testing/selftests/powerpc/tm/
H A DMakefile3 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 \
23 $(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
H A D.gitignore13 tm-signal-context-chk-vmx
18 tm-vmx-unavail
/linux-6.15/arch/powerpc/crypto/
H A DMakefile16 obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o
27 vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
/linux-6.15/arch/x86/virt/
H A DMakefile2 obj-y += svm/ vmx/

12