Home
last modified time | relevance | path

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

12

/linux/tools/testing/selftests/kvm/lib/x86/
H A Dvmx.c11 #include "vmx.h"
85 struct vmx_pages *vmx = addr_gva2hva(vm, vmx_gva); in vcpu_alloc_vmx() local
88 vmx->vmxon = (void *)vm_alloc_page(vm); in vcpu_alloc_vmx()
89 vmx->vmxon_hva = addr_gva2hva(vm, (uintptr_t)vmx->vmxon); in vcpu_alloc_vmx()
90 vmx->vmxon_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->vmxon); in vcpu_alloc_vmx()
93 vmx->vmcs = (void *)vm_alloc_page(vm); in vcpu_alloc_vmx()
94 vmx->vmcs_hva = addr_gva2hva(vm, (uintptr_t)vmx in vcpu_alloc_vmx()
126 prepare_for_vmx_operation(struct vmx_pages * vmx) prepare_for_vmx_operation() argument
170 load_vmcs(struct vmx_pages * vmx) load_vmcs() argument
201 init_vmcs_control_fields(struct vmx_pages * vmx) init_vmcs_control_fields() argument
369 prepare_vmcs(struct vmx_pages * vmx,void * guest_rip,void * guest_rsp) prepare_vmcs() argument
391 prepare_virtualize_apic_accesses(struct vmx_pages * vmx,struct kvm_vm * vm) prepare_virtualize_apic_accesses() argument
[all...]
H A Dmemstress.c17 #include "vmx.h"
33 static void l1_vmx_code(struct vmx_pages *vmx, u64 vcpu_id)
35 GUEST_ASSERT(vmx->vmcs_gpa); in l1_vmx_code() argument
36 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_vmx_code()
37 GUEST_ASSERT(load_vmcs(vmx)); in l1_vmx_code()
40 *(u64 *)vmx->stack = vcpu_id; in l1_vmx_code()
41 prepare_vmcs(vmx, memstress_l2_guest_entry); in l1_vmx_code()
/linux/arch/x86/kvm/vmx/
H A Dvmx.c485 static __always_inline void vmx_disable_fb_clear(struct vcpu_vmx *vmx) in vmx_disable_fb_clear() argument
489 if (!vmx->disable_fb_clear) in vmx_disable_fb_clear()
496 vmx->msr_ia32_mcu_opt_ctrl = msr; in vmx_disable_fb_clear()
499 static __always_inline void vmx_enable_fb_clear(struct vcpu_vmx *vmx) in vmx_enable_fb_clear() argument
501 if (!vmx->disable_fb_clear) in vmx_enable_fb_clear()
504 vmx->msr_ia32_mcu_opt_ctrl &= ~FB_CLEAR_DIS; in vmx_enable_fb_clear()
505 native_wrmsrq(MSR_IA32_MCU_OPT_CTRL, vmx->msr_ia32_mcu_opt_ctrl); in vmx_enable_fb_clear()
508 static void vmx_update_fb_clear_dis(struct kvm_vcpu *vcpu, struct vcpu_vmx *vmx) in vmx_update_fb_clear_dis() argument
518 vmx->disable_fb_clear = !cpu_feature_enabled(X86_FEATURE_CLEAR_CPU_BUF) && in vmx_update_fb_clear_dis()
534 vmx->disable_fb_clear = false; in vmx_update_fb_clear_dis()
[all …]
H A Dvmx.h347 void vmx_set_constant_host_state(struct vcpu_vmx *vmx);
361 void set_cr4_guest_host_mask(struct vcpu_vmx *vmx);
374 struct vmx_uret_msr *vmx_find_uret_msr(struct vcpu_vmx *vmx, u32 msr);
376 void vmx_update_host_rsp(struct vcpu_vmx *vmx, unsigned long host_rsp);
377 unsigned int __vmx_vcpu_enter_flags(struct vcpu_vmx *vmx);
378 bool __vmx_vcpu_run(struct vcpu_vmx *vmx, unsigned int flags);
583 static inline void lname##_controls_set(struct vcpu_vmx *vmx, u##bits val) \
585 if (vmx->loaded_vmcs->controls_shadow.lname != val) { \
587 vmx->loaded_vmcs->controls_shadow.lname = val; \
594 static inline u##bits lname##_controls_get(struct vcpu_vmx *vmx) \
[all …]
/linux/tools/testing/selftests/powerpc/ptrace/
H A Dptrace-vsx.h31 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 …]
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/tools/testing/selftests/kvm/x86/
H A Dvmx_dirty_log_test.c
H A Dnested_set_state_test.c81 state->hdr.vmx.vmxon_pa = 0x1000; in set_default_vmx_state()
82 state->hdr.vmx.vmcs12_pa = 0x2000; in set_default_vmx_state()
83 state->hdr.vmx.smm.flags = 0; in set_default_vmx_state()
112 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state()
115 state->hdr.vmx.vmcs12_pa = -1ull; in test_vmx_nested_state()
132 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state()
133 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.flags = ~0; in test_vmx_nested_state()
158 state->hdr.vmx.vmxon_pa = -1ull; in test_vmx_nested_state()
[all …]
H A Dtriple_fault_event_test.c5 #include "vmx.h"
24 void l1_guest_code_vmx(struct vmx_pages *vmx)
27 GUEST_ASSERT(vmx->vmcs_gpa); in l1_guest_code_vmx() argument
28 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_guest_code_vmx()
29 GUEST_ASSERT(load_vmcs(vmx)); in l1_guest_code_vmx()
31 prepare_vmcs(vmx, l2_guest_code); in l1_guest_code_vmx()
H A Dnested_dirty_log_test.c16 #include "vmx.h"
91 void l1_vmx_code(struct vmx_pages *vmx) in l2_guest_code_tdp_disabled()
95 GUEST_ASSERT(vmx->vmcs_gpa); in l1_vmx_code()
96 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_vmx_code()
97 GUEST_ASSERT(load_vmcs(vmx)); in l1_vmx_code()
99 if (vmx->eptp_gpa) in l1_vmx_code()
104 prepare_vmcs(vmx, l2_rip); in l1_vmx_code()
93 l1_vmx_code(struct vmx_pages * vmx) l1_vmx_code() argument
H A Dkvm_buslock_test.c10 #include "vmx.h"
43 static void l1_vmx_code(struct vmx_pages *vmx) in l1_svm_code()
45 GUEST_ASSERT_EQ(prepare_for_vmx_operation(vmx), true);
46 GUEST_ASSERT_EQ(load_vmcs(vmx), true); in l1_vmx_code() argument
48 prepare_vmcs(vmx, NULL); in l1_vmx_code()
H A Dvmx_apic_access_test.c24 #include "vmx.h"
74 struct vmx_pages *vmx; in main()
86 vmx = vcpu_alloc_vmx(vm, &vmx_pages_gva); in main()
87 prepare_virtualize_apic_accesses(vmx, vm); in main()
77 struct vmx_pages *vmx; main() local
H A Daperfmperf_test.c26 #include "vmx.h"
71 static void l1_vmx_code(struct vmx_pages *vmx) in l1_svm_code()
73 GUEST_ASSERT_EQ(prepare_for_vmx_operation(vmx), true);
74 GUEST_ASSERT_EQ(load_vmcs(vmx), true); in l1_vmx_code() argument
76 prepare_vmcs(vmx, NULL); in l1_vmx_code()
H A Dvmx_apicv_updates_test.c5 #include "vmx.h"
112 struct vmx_pages *vmx; in main()
121 vmx = vcpu_alloc_vmx(vm, &vmx_pages_gva); in main()
122 prepare_virtualize_apic_accesses(vmx, vm); in main()
114 struct vmx_pages *vmx; main() local
H A Dnested_exceptions_test.c5 #include "vmx.h"
126 static void l1_vmx_code(struct vmx_pages *vmx) in vmx_run_l2()
128 GUEST_ASSERT_EQ(prepare_for_vmx_operation(vmx), true);
130 GUEST_ASSERT_EQ(load_vmcs(vmx), true); in l1_vmx_code()
132 prepare_vmcs(vmx, NULL); in l1_vmx_code()
129 l1_vmx_code(struct vmx_pages * vmx) l1_vmx_code() argument
/linux/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/tools/testing/selftests/kvm/include/x86/
H A Dvmx.h9 #include <asm/vmx.h>
553 bool prepare_for_vmx_operation(struct vmx_pages *vmx);
554 void prepare_vmcs(struct vmx_pages *vmx, void *guest_rip);
555 bool load_vmcs(struct vmx_pages *vmx);
561 void prepare_virtualize_apic_accesses(struct vmx_pages *vmx, struct kvm_vm *vm);
/linux/Documentation/virt/kvm/x86/
H A Dindex.rst17 nested-vmx
H A Dnested-vmx.rst51 - cpu qemu64,+vmx (add just the vmx feature to a named CPU type)
71 internals of this structure; This is struct vmcs12 from arch/x86/kvm/vmx.c.
80 VMCS12_REVISION (from vmx.c) should be changed if struct vmcs12 or its inner
/linux/lib/zstd/common/
H A Dcpu.h104 C(vmx, 5)
/linux/tools/arch/x86/include/uapi/asm/
H A Dkvm.h546 struct kvm_vmx_nested_state_hdr vmx; member
559 __DECLARE_FLEX_ARRAY(struct kvm_vmx_nested_state_data, vmx);

12