Home
last modified time | relevance | path

Searched refs:svm (Results 1 – 25 of 37) sorted by relevance

12

/linux/arch/x86/kvm/svm/
H A Dsvm.c300 struct vcpu_svm *svm = to_svm(vcpu); in svm_set_efer() local
315 svm_set_gif(svm, true); in svm_set_efer()
318 clr_exception_intercept(svm, GP_VECTOR); in svm_set_efer()
326 svm_free_nested(svm); in svm_set_efer()
329 int ret = svm_allocate_nested(svm); in svm_set_efer()
341 set_exception_intercept(svm, GP_VECTOR); in svm_set_efer()
345 svm->vmcb->save.efer = efer | EFER_SVME; in svm_set_efer()
346 vmcb_mark_dirty(svm->vmcb, VMCB_CR); in svm_set_efer()
352 struct vcpu_svm *svm = to_svm(vcpu); in svm_get_interrupt_shadow() local
355 if (svm->vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) in svm_get_interrupt_shadow()
[all …]
H A Dsvm.h349 void recalc_intercepts(struct vcpu_svm *svm);
395 static inline bool ghcb_gpa_is_registered(struct vcpu_svm *svm, u64 val) in ghcb_gpa_is_registered() argument
397 return svm->sev_es.ghcb_registered_gpa == val; in ghcb_gpa_is_registered()
460 static inline void set_exception_intercept(struct vcpu_svm *svm, u32 bit) in set_exception_intercept() argument
462 struct vmcb *vmcb = svm->vmcb01.ptr; in set_exception_intercept()
467 recalc_intercepts(svm); in set_exception_intercept()
470 static inline void clr_exception_intercept(struct vcpu_svm *svm, u32 bit) in clr_exception_intercept() argument
472 struct vmcb *vmcb = svm->vmcb01.ptr; in clr_exception_intercept()
477 recalc_intercepts(svm); in clr_exception_intercept()
480 static inline void svm_set_intercept(struct vcpu_svm *svm, int bit) in svm_set_intercept() argument
[all …]
H A Davic.c85 static void avic_activate_vmcb(struct vcpu_svm *svm) in avic_activate_vmcb() argument
87 struct vmcb *vmcb = svm->vmcb01.ptr; in avic_activate_vmcb()
101 if (x2avic_enabled && apic_x2apic_mode(svm->vcpu.arch.apic)) { in avic_activate_vmcb()
105 svm_set_x2apic_msr_interception(svm, false); in avic_activate_vmcb()
111 kvm_make_request(KVM_REQ_TLB_FLUSH_CURRENT, &svm->vcpu); in avic_activate_vmcb()
116 svm_set_x2apic_msr_interception(svm, true); in avic_activate_vmcb()
120 static void avic_deactivate_vmcb(struct vcpu_svm *svm) in avic_deactivate_vmcb() argument
122 struct vmcb *vmcb = svm->vmcb01.ptr; in avic_deactivate_vmcb()
131 if (is_guest_mode(&svm->vcpu) && in avic_deactivate_vmcb()
132 vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT)) in avic_deactivate_vmcb()
[all …]
H A Dsev.c140 static bool sev_vcpu_has_debug_swap(struct vcpu_svm *svm) in sev_vcpu_has_debug_swap() argument
142 struct kvm_vcpu *vcpu = &svm->vcpu; in sev_vcpu_has_debug_swap()
804 static int sev_es_sync_vmsa(struct vcpu_svm *svm) in sev_es_sync_vmsa() argument
806 struct kvm_vcpu *vcpu = &svm->vcpu; in sev_es_sync_vmsa()
808 struct sev_es_save_area *save = svm->sev_es.vmsa; in sev_es_sync_vmsa()
815 if (svm->vcpu.guest_debug || (svm->vmcb->save.dr7 & ~DR7_FIXED_1)) in sev_es_sync_vmsa()
824 memcpy(save, &svm->vmcb->save, sizeof(svm->vmcb->save)); in sev_es_sync_vmsa()
827 save->rax = svm->vcpu.arch.regs[VCPU_REGS_RAX]; in sev_es_sync_vmsa()
828 save->rbx = svm->vcpu.arch.regs[VCPU_REGS_RBX]; in sev_es_sync_vmsa()
829 save->rcx = svm->vcpu.arch.regs[VCPU_REGS_RCX]; in sev_es_sync_vmsa()
[all …]
H A Dhyperv.c11 struct vcpu_svm *svm = to_svm(vcpu); in svm_hv_inject_synthetic_vmexit_post_tlb_flush() local
13 svm->vmcb->control.exit_code = HV_SVM_EXITCODE_ENL; in svm_hv_inject_synthetic_vmexit_post_tlb_flush()
14 svm->vmcb->control.exit_code_hi = 0; in svm_hv_inject_synthetic_vmexit_post_tlb_flush()
15 svm->vmcb->control.exit_info_1 = HV_SVM_ENL_EXITCODE_TRAP_AFTER_FLUSH; in svm_hv_inject_synthetic_vmexit_post_tlb_flush()
16 svm->vmcb->control.exit_info_2 = 0; in svm_hv_inject_synthetic_vmexit_post_tlb_flush()
17 nested_svm_vmexit(svm); in svm_hv_inject_synthetic_vmexit_post_tlb_flush()
H A Dhyperv.h17 struct vcpu_svm *svm = to_svm(vcpu); in nested_svm_hv_update_vm_vp_ids() local
18 struct hv_vmcb_enlightenments *hve = &svm->nested.ctl.hv_enlightenments; in nested_svm_hv_update_vm_vp_ids()
31 struct vcpu_svm *svm = to_svm(vcpu); in nested_svm_l2_tlb_flush_enabled() local
32 struct hv_vmcb_enlightenments *hve = &svm->nested.ctl.hv_enlightenments; in nested_svm_l2_tlb_flush_enabled()
/linux/tools/testing/selftests/kvm/lib/x86_64/
H A Dsvm.c35 struct svm_test_data *svm = addr_gva2hva(vm, svm_gva); in vcpu_alloc_svm() local
37 svm->vmcb = (void *)vm_vaddr_alloc_page(vm); in vcpu_alloc_svm()
38 svm->vmcb_hva = addr_gva2hva(vm, (uintptr_t)svm->vmcb); in vcpu_alloc_svm()
39 svm->vmcb_gpa = addr_gva2gpa(vm, (uintptr_t)svm->vmcb); in vcpu_alloc_svm()
41 svm->save_area = (void *)vm_vaddr_alloc_page(vm); in vcpu_alloc_svm()
42 svm->save_area_hva = addr_gva2hva(vm, (uintptr_t)svm->save_area); in vcpu_alloc_svm()
43 svm->save_area_gpa = addr_gva2gpa(vm, (uintptr_t)svm->save_area); in vcpu_alloc_svm()
45 svm->msr = (void *)vm_vaddr_alloc_page(vm); in vcpu_alloc_svm()
46 svm->msr_hva = addr_gva2hva(vm, (uintptr_t)svm->msr); in vcpu_alloc_svm()
47 svm->msr_gpa = addr_gva2gpa(vm, (uintptr_t)svm->msr); in vcpu_alloc_svm()
[all …]
/linux/drivers/gpu/drm/nouveau/
H A Dnouveau_svm.c94 nouveau_ivmm_find(struct nouveau_svm *svm, u64 inst) in nouveau_ivmm_find() argument
97 list_for_each_entry(ivmm, &svm->inst, head) { in nouveau_ivmm_find()
169 if (!cli->svm.svmm) { in nouveau_svmm_bind()
186 nouveau_dmem_migrate_vma(cli->drm, cli->svm.svmm, vma, addr, in nouveau_svmm_bind()
210 mutex_lock(&svmm->vmm->cli->drm->svm->mutex); in nouveau_svmm_part()
211 ivmm = nouveau_ivmm_find(svmm->vmm->cli->drm->svm, inst); in nouveau_svmm_part()
216 mutex_unlock(&svmm->vmm->cli->drm->svm->mutex); in nouveau_svmm_part()
231 mutex_lock(&svmm->vmm->cli->drm->svm->mutex); in nouveau_svmm_join()
232 list_add(&ivmm->head, &svmm->vmm->cli->drm->svm->inst); in nouveau_svmm_join()
233 mutex_unlock(&svmm->vmm->cli->drm->svm->mutex); in nouveau_svmm_join()
[all …]
H A Dnouveau_drv.h95 struct nouveau_vmm svm; member
151 if (cli->svm.cli) in nouveau_cli_vmm()
152 return &cli->svm; in nouveau_cli_vmm()
301 struct nouveau_svm *svm; member
/linux/tools/testing/selftests/kvm/x86_64/
H A Dhyperv_svm_test.c68 static void __attribute__((__flatten__)) guest_code(struct svm_test_data *svm, in guest_code() argument
73 struct vmcb *vmcb = svm->vmcb; in guest_code()
82 GUEST_ASSERT(svm->vmcb_gpa); in guest_code()
84 generic_svm_setup(svm, l2_guest_code, in guest_code()
96 run_guest(vmcb, svm->vmcb_gpa); in guest_code()
103 __set_bit(2 * (MSR_FS_BASE & 0x1fff), svm->msr + 0x800); in guest_code()
104 run_guest(vmcb, svm->vmcb_gpa); in guest_code()
110 run_guest(vmcb, svm->vmcb_gpa); in guest_code()
115 __set_bit(2 * (MSR_GS_BASE & 0x1fff), svm->msr + 0x800); in guest_code()
118 run_guest(vmcb, svm->vmcb_gpa); in guest_code()
[all …]
H A Dnested_exceptions_test.c74 static void svm_run_l2(struct svm_test_data *svm, void *l2_code, int vector, in svm_run_l2() argument
77 struct vmcb *vmcb = svm->vmcb; in svm_run_l2()
81 run_guest(vmcb, svm->vmcb_gpa); in svm_run_l2()
90 static void l1_svm_code(struct svm_test_data *svm) in l1_svm_code() argument
92 struct vmcb_control_area *ctrl = &svm->vmcb->control; in l1_svm_code()
95 generic_svm_setup(svm, NULL, &l2_guest_stack[L2_GUEST_STACK_SIZE]); in l1_svm_code()
96 svm->vmcb->save.idtr.limit = 0; in l1_svm_code()
100 svm_run_l2(svm, l2_ss_pending_test, SS_VECTOR, SS_ERROR_CODE); in l1_svm_code()
101 svm_run_l2(svm, l2_ss_injected_gp_test, GP_VECTOR, GP_ERROR_CODE_AMD); in l1_svm_code()
104 svm_run_l2(svm, l2_ss_injected_df_test, DF_VECTOR, DF_ERROR_CODE); in l1_svm_code()
[all …]
H A Dsvm_nested_shutdown_test.c15 static void l2_guest_code(struct svm_test_data *svm) in l2_guest_code() argument
20 static void l1_guest_code(struct svm_test_data *svm, struct idt_entry *idt) in l1_guest_code() argument
24 struct vmcb *vmcb = svm->vmcb; in l1_guest_code()
26 generic_svm_setup(svm, l2_guest_code, in l1_guest_code()
36 run_guest(vmcb, svm->vmcb_gpa); in l1_guest_code()
H A Dsvm_vmcall_test.c15 static void l2_guest_code(struct svm_test_data *svm) in l2_guest_code() argument
20 static void l1_guest_code(struct svm_test_data *svm) in l1_guest_code() argument
24 struct vmcb *vmcb = svm->vmcb; in l1_guest_code()
27 generic_svm_setup(svm, l2_guest_code, in l1_guest_code()
30 run_guest(vmcb, svm->vmcb_gpa); in l1_guest_code()
H A Dsvm_int_ctl_test.c33 static void l2_guest_code(struct svm_test_data *svm) in l2_guest_code() argument
58 static void l1_guest_code(struct svm_test_data *svm) in l1_guest_code() argument
62 struct vmcb *vmcb = svm->vmcb; in l1_guest_code()
67 generic_svm_setup(svm, l2_guest_code, in l1_guest_code()
80 run_guest(vmcb, svm->vmcb_gpa); in l1_guest_code()
H A Dsmm_test.c71 struct svm_test_data *svm = arg; in guest_code() local
86 generic_svm_setup(svm, l2_guest_code, in guest_code()
102 run_guest(svm->vmcb, svm->vmcb_gpa); in guest_code()
103 run_guest(svm->vmcb, svm->vmcb_gpa); in guest_code()
H A Dtriple_fault_event_test.c43 void l1_guest_code_svm(struct svm_test_data *svm) in l1_guest_code_svm() argument
45 struct vmcb *vmcb = svm->vmcb; in l1_guest_code_svm()
47 generic_svm_setup(svm, l2_guest_code, in l1_guest_code_svm()
53 run_guest(vmcb, svm->vmcb_gpa); in l1_guest_code_svm()
H A Dsvm_nested_soft_inject_test.c79 static void l1_guest_code(struct svm_test_data *svm, uint64_t is_nmi, uint64_t idt_alt) in l1_guest_code() argument
83 struct vmcb *vmcb = svm->vmcb; in l1_guest_code()
89 generic_svm_setup(svm, in l1_guest_code()
104 run_guest(vmcb, svm->vmcb_gpa); in l1_guest_code()
134 run_guest(vmcb, svm->vmcb_gpa); in l1_guest_code()
H A Dstate_test.c34 static void svm_l1_guest_code(struct svm_test_data *svm) in svm_l1_guest_code() argument
37 struct vmcb *vmcb = svm->vmcb; in svm_l1_guest_code()
39 GUEST_ASSERT(svm->vmcb_gpa); in svm_l1_guest_code()
41 generic_svm_setup(svm, svm_l2_guest_code, in svm_l1_guest_code()
45 run_guest(vmcb, svm->vmcb_gpa); in svm_l1_guest_code()
49 run_guest(vmcb, svm->vmcb_gpa); in svm_l1_guest_code()
/linux/arch/arm/mm/
H A Dioremap.c52 struct static_vm *svm; in find_static_vm_paddr() local
55 list_for_each_entry(svm, &static_vmlist, list) { in find_static_vm_paddr()
56 vm = &svm->vm; in find_static_vm_paddr()
66 return svm; in find_static_vm_paddr()
74 struct static_vm *svm; in find_static_vm_vaddr() local
77 list_for_each_entry(svm, &static_vmlist, list) { in find_static_vm_vaddr()
78 vm = &svm->vm; in find_static_vm_vaddr()
85 return svm; in find_static_vm_vaddr()
91 void __init add_static_vm_early(struct static_vm *svm) in add_static_vm_early() argument
97 vm = &svm->vm; in add_static_vm_early()
[all …]
H A Dmmu.c1025 struct static_vm *svm; in iotable_init() local
1030 svm = memblock_alloc(sizeof(*svm) * nr, __alignof__(*svm)); in iotable_init()
1031 if (!svm) in iotable_init()
1033 __func__, sizeof(*svm) * nr, __alignof__(*svm)); in iotable_init()
1038 vm = &svm->vm; in iotable_init()
1045 add_static_vm_early(svm++); in iotable_init()
1053 struct static_vm *svm; in vm_reserve_area_early() local
1055 svm = memblock_alloc(sizeof(*svm), __alignof__(*svm)); in vm_reserve_area_early()
1056 if (!svm) in vm_reserve_area_early()
1058 __func__, sizeof(*svm), __alignof__(*svm)); in vm_reserve_area_early()
[all …]
/linux/tools/testing/vsock/
H A Dvsock_perf.c104 struct sockaddr_vm svm; in vsock_connect() member
106 .svm = { in vsock_connect()
121 if (connect(fd, &addr.sa, sizeof(addr.svm)) < 0) { in vsock_connect()
147 struct sockaddr_vm svm; in run_receiver() member
149 .svm = { in run_receiver()
157 struct sockaddr_vm svm; in run_receiver() member
160 socklen_t clientaddr_len = sizeof(clientaddr.svm); in run_receiver()
173 if (bind(fd, &addr.sa, sizeof(addr.svm)) < 0) in run_receiver()
H A Dutil.c146 struct sockaddr_vm svm; in vsock_connect() member
148 .svm = { in vsock_connect()
167 ret = connect(fd, &addr.sa, sizeof(addr.svm)); in vsock_connect()
197 struct sockaddr_vm svm; in vsock_listen() member
199 .svm = { in vsock_listen()
213 if (bind(fd, &addr.sa, sizeof(addr.svm)) < 0) { in vsock_listen()
234 struct sockaddr_vm svm; in vsock_accept() member
236 socklen_t clientaddr_len = sizeof(clientaddr.svm); in vsock_accept()
257 if (clientaddr_len != sizeof(clientaddr.svm)) { in vsock_accept()
269 *clientaddrp = clientaddr.svm; in vsock_accept()
H A Dvsock_test.c35 struct sockaddr_vm svm; in test_stream_connection_reset() member
37 .svm = { in test_stream_connection_reset()
50 ret = connect(fd, &addr.sa, sizeof(addr.svm)); in test_stream_connection_reset()
71 struct sockaddr_vm svm; in test_stream_bind_only_client() member
73 .svm = { in test_stream_bind_only_client()
89 ret = connect(fd, &addr.sa, sizeof(addr.svm)); in test_stream_bind_only_client()
113 struct sockaddr_vm svm; in test_stream_bind_only_server() member
115 .svm = { in test_stream_bind_only_server()
125 if (bind(fd, &addr.sa, sizeof(addr.svm)) < 0) { in test_stream_bind_only_server()
/linux/arch/x86/virt/
H A DMakefile2 obj-y += svm/ vmx/
/linux/tools/testing/selftests/kvm/include/x86_64/
H A Dsvm_util.h60 void generic_svm_setup(struct svm_test_data *svm, void *guest_rip, void *guest_rsp);

12