Home
last modified time | relevance | path

Searched refs:vmcb (Results 1 – 13 of 13) sorted by relevance

/Linux-v5.10/arch/x86/kvm/svm/
Dsvm.h86 struct vmcb *hsave;
106 struct vmcb *vmcb; member
181 struct vmcb *current_vmcb;
184 struct vmcb **sev_vmcbs;
196 static inline void vmcb_mark_all_dirty(struct vmcb *vmcb) in vmcb_mark_all_dirty() argument
198 vmcb->control.clean = 0; in vmcb_mark_all_dirty()
201 static inline void vmcb_mark_all_clean(struct vmcb *vmcb) in vmcb_mark_all_clean() argument
203 vmcb->control.clean = ((1 << VMCB_DIRTY_MAX) - 1) in vmcb_mark_all_clean()
207 static inline void vmcb_mark_dirty(struct vmcb *vmcb, int bit) in vmcb_mark_dirty() argument
209 vmcb->control.clean &= ~(1 << bit); in vmcb_mark_dirty()
[all …]
Dnested.c37 if (svm->vmcb->control.exit_code != SVM_EXIT_NPF) { in nested_svm_inject_npf_exit()
42 svm->vmcb->control.exit_code = SVM_EXIT_NPF; in nested_svm_inject_npf_exit()
43 svm->vmcb->control.exit_code_hi = 0; in nested_svm_inject_npf_exit()
44 svm->vmcb->control.exit_info_1 = (1ULL << 32); in nested_svm_inject_npf_exit()
45 svm->vmcb->control.exit_info_2 = fault->address; in nested_svm_inject_npf_exit()
48 svm->vmcb->control.exit_info_1 &= ~0xffffffffULL; in nested_svm_inject_npf_exit()
49 svm->vmcb->control.exit_info_1 |= fault->error_code; in nested_svm_inject_npf_exit()
78 struct vmcb *hsave = svm->nested.hsave; in nested_svm_init_mmu_context()
103 vmcb_mark_dirty(svm->vmcb, VMCB_INTERCEPTS); in recalc_intercepts()
108 c = &svm->vmcb->control; in recalc_intercepts()
[all …]
Dsvm.c303 svm->vmcb->save.efer = efer | EFER_SVME; in svm_set_efer()
304 vmcb_mark_dirty(svm->vmcb, VMCB_CR); in svm_set_efer()
319 if (svm->vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) in svm_get_interrupt_shadow()
329 svm->vmcb->control.int_state &= ~SVM_INTERRUPT_SHADOW_MASK; in svm_set_interrupt_shadow()
331 svm->vmcb->control.int_state |= SVM_INTERRUPT_SHADOW_MASK; in svm_set_interrupt_shadow()
339 if (nrips && svm->vmcb->control.next_rip != 0) { in skip_emulated_instruction()
341 svm->next_rip = svm->vmcb->control.next_rip; in skip_emulated_instruction()
376 svm->int3_rip = rip + svm->vmcb->save.cs.base; in svm_queue_exception()
380 svm->vmcb->control.event_inj = nr in svm_queue_exception()
384 svm->vmcb->control.event_inj_err = error_code; in svm_queue_exception()
[all …]
Davic.c196 struct vmcb *vmcb = svm->vmcb; in avic_init_vmcb() local
202 vmcb->control.avic_backing_page = bpa & AVIC_HPA_MASK; in avic_init_vmcb()
203 vmcb->control.avic_logical_id = lpa & AVIC_HPA_MASK; in avic_init_vmcb()
204 vmcb->control.avic_physical_id = ppa & AVIC_HPA_MASK; in avic_init_vmcb()
205 vmcb->control.avic_physical_id |= AVIC_MAX_PHYSICAL_ID_COUNT; in avic_init_vmcb()
207 vmcb->control.int_ctl |= AVIC_ENABLE_MASK; in avic_init_vmcb()
209 vmcb->control.int_ctl &= ~AVIC_ENABLE_MASK; in avic_init_vmcb()
300 u32 icrh = svm->vmcb->control.exit_info_1 >> 32; in avic_incomplete_ipi_interception()
301 u32 icrl = svm->vmcb->control.exit_info_1; in avic_incomplete_ipi_interception()
302 u32 id = svm->vmcb->control.exit_info_2 >> 32; in avic_incomplete_ipi_interception()
[all …]
Dsev.c1190 svm->vmcb->control.asid = asid; in pre_sev_run()
1198 if (sd->sev_vmcbs[asid] == svm->vmcb && in pre_sev_run()
1202 sd->sev_vmcbs[asid] = svm->vmcb; in pre_sev_run()
1203 svm->vmcb->control.tlb_ctl = TLB_CONTROL_FLUSH_ASID; in pre_sev_run()
1204 vmcb_mark_dirty(svm->vmcb, VMCB_ASID); in pre_sev_run()
/Linux-v5.10/tools/testing/selftests/kvm/lib/x86_64/
Dsvm.c37 svm->vmcb = (void *)vm_vaddr_alloc(vm, getpagesize(), in vcpu_alloc_svm()
39 svm->vmcb_hva = addr_gva2hva(vm, (uintptr_t)svm->vmcb); in vcpu_alloc_svm()
40 svm->vmcb_gpa = addr_gva2gpa(vm, (uintptr_t)svm->vmcb); in vcpu_alloc_svm()
62 struct vmcb *vmcb = svm->vmcb; in generic_svm_setup() local
64 struct vmcb_save_area *save = &vmcb->save; in generic_svm_setup()
65 struct vmcb_control_area *ctrl = &vmcb->control; in generic_svm_setup()
76 memset(vmcb, 0, sizeof(*vmcb)); in generic_svm_setup()
99 vmcb->save.rip = (u64)guest_rip; in generic_svm_setup()
100 vmcb->save.rsp = (u64)guest_rsp; in generic_svm_setup()
131 void run_guest(struct vmcb *vmcb, uint64_t vmcb_gpa) in run_guest() argument
[all …]
/Linux-v5.10/tools/testing/selftests/kvm/x86_64/
Dsvm_vmcall_test.c28 struct vmcb *vmcb = svm->vmcb; in l1_guest_code() local
34 run_guest(vmcb, svm->vmcb_gpa); in l1_guest_code()
36 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in l1_guest_code()
Dstate_test.c39 struct vmcb *vmcb = svm->vmcb; in svm_l1_guest_code() local
47 run_guest(vmcb, svm->vmcb_gpa); in svm_l1_guest_code()
48 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in svm_l1_guest_code()
50 vmcb->save.rip += 3; in svm_l1_guest_code()
51 run_guest(vmcb, svm->vmcb_gpa); in svm_l1_guest_code()
52 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in svm_l1_guest_code()
/Linux-v5.10/tools/testing/selftests/kvm/include/x86_64/
Dsvm_util.h23 struct vmcb *vmcb; /* gva */ member
35 void run_guest(struct vmcb *vmcb, uint64_t vmcb_gpa);
Dsvm.h209 struct __attribute__ ((__packed__)) vmcb { struct
/Linux-v5.10/arch/x86/kvm/
Dtrace.h528 TP_PROTO(__u64 rip, __u64 vmcb, __u64 nested_rip, __u32 int_ctl,
530 TP_ARGS(rip, vmcb, nested_rip, int_ctl, event_inj, npt),
534 __field( __u64, vmcb )
543 __entry->vmcb = vmcb;
552 __entry->rip, __entry->vmcb, __entry->nested_rip,
/Linux-v5.10/arch/x86/include/asm/
Dsvm.h307 struct vmcb { struct
/Linux-v5.10/Documentation/virt/kvm/
Dlocking.rst212 - tsc offset in vmcb