Home
last modified time | relevance | path

Searched refs:ghcb (Results 1 – 12 of 12) sorted by relevance

/linux-6.3-rc2/arch/x86/kernel/
A Dsev.c110 struct ghcb *ghcb; member
205 struct ghcb *ghcb; in __sev_get_ghcb() local
236 *state->ghcb = *ghcb; in __sev_get_ghcb()
521 struct ghcb *ghcb; in __sev_put_ghcb() local
546 struct ghcb *ghcb; in __sev_es_nmi_complete() local
617 struct ghcb *ghcb; in get_jump_table_addr() local
764 struct ghcb *ghcb; in vmgexit_psc() local
990 struct ghcb *ghcb; in wakeup_cpu_via_vmgexit() local
1240 struct ghcb *ghcb; in snp_register_per_cpu_ghcb() local
1289 struct ghcb *ghcb; in sev_es_ap_hlt_loop() local
[all …]
A Dsev-shared.c161 static __always_inline void vc_ghcb_invalidate(struct ghcb *ghcb) in vc_ghcb_invalidate() argument
164 __builtin_memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in vc_ghcb_invalidate()
194 static enum es_result verify_exception_info(struct ghcb *ghcb, struct es_em_ctxt *ctxt) in verify_exception_info() argument
222 static enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb, in sev_es_ghcb_hv_call() argument
740 static enum es_result vc_handle_ioio(struct ghcb *ghcb, struct es_em_ctxt *ctxt) in vc_handle_ioio() argument
790 sw_scratch = __pa(ghcb) + offsetof(struct ghcb, shared_buffer); in vc_handle_ioio()
832 ghcb_set_rax(ghcb, rax); in vc_handle_ioio()
866 static enum es_result vc_handle_cpuid(struct ghcb *ghcb, in vc_handle_cpuid() argument
888 ghcb_set_xcr0(ghcb, 1); in vc_handle_cpuid()
908 static enum es_result vc_handle_rdtsc(struct ghcb *ghcb, in vc_handle_rdtsc() argument
[all …]
A Dkvm.c986 static void kvm_sev_es_hcall_prepare(struct ghcb *ghcb, struct pt_regs *regs) in kvm_sev_es_hcall_prepare() argument
989 ghcb_set_rbx(ghcb, regs->bx); in kvm_sev_es_hcall_prepare()
990 ghcb_set_rcx(ghcb, regs->cx); in kvm_sev_es_hcall_prepare()
991 ghcb_set_rdx(ghcb, regs->dx); in kvm_sev_es_hcall_prepare()
992 ghcb_set_rsi(ghcb, regs->si); in kvm_sev_es_hcall_prepare()
995 static bool kvm_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in kvm_sev_es_hcall_finish() argument
/linux-6.3-rc2/arch/x86/hyperv/
A Divm.c24 struct ghcb ghcb; member
90 hv_ghcb->ghcb.ghcb_usage = 0xffffffff; in hv_ghcb_hypercall()
91 memset(hv_ghcb->ghcb.save.valid_bitmap, 0, in hv_ghcb_hypercall()
111 static enum es_result hv_ghcb_hv_call(struct ghcb *ghcb, u64 exit_code, in hv_ghcb_hv_call() argument
115 ghcb->protocol_version = hv_ghcb_version; in hv_ghcb_hv_call()
116 ghcb->ghcb_usage = GHCB_DEFAULT_USAGE; in hv_ghcb_hv_call()
118 ghcb_set_sw_exit_code(ghcb, exit_code); in hv_ghcb_hv_call()
119 ghcb_set_sw_exit_info_1(ghcb, exit_info_1); in hv_ghcb_hv_call()
120 ghcb_set_sw_exit_info_2(ghcb, exit_info_2); in hv_ghcb_hv_call()
194 ghcb_set_rcx(&hv_ghcb->ghcb, msr); in hv_ghcb_msr_write()
[all …]
/linux-6.3-rc2/arch/x86/kernel/cpu/
A Dvmware.c484 static void vmware_sev_es_hcall_prepare(struct ghcb *ghcb, in vmware_sev_es_hcall_prepare() argument
488 ghcb_set_rip(ghcb, regs->ip); in vmware_sev_es_hcall_prepare()
489 ghcb_set_rbx(ghcb, regs->bx); in vmware_sev_es_hcall_prepare()
490 ghcb_set_rcx(ghcb, regs->cx); in vmware_sev_es_hcall_prepare()
491 ghcb_set_rdx(ghcb, regs->dx); in vmware_sev_es_hcall_prepare()
492 ghcb_set_rsi(ghcb, regs->si); in vmware_sev_es_hcall_prepare()
493 ghcb_set_rdi(ghcb, regs->di); in vmware_sev_es_hcall_prepare()
494 ghcb_set_rbp(ghcb, regs->bp); in vmware_sev_es_hcall_prepare()
497 static bool vmware_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in vmware_sev_es_hcall_finish() argument
507 regs->bx = ghcb_get_rbx(ghcb); in vmware_sev_es_hcall_finish()
[all …]
/linux-6.3-rc2/arch/x86/kvm/svm/
A Dsev.c2351 struct ghcb *ghcb = svm->sev_es.ghcb; in dump_ghcb() local
2364 ghcb->save.sw_exit_code, ghcb_sw_exit_code_is_valid(ghcb)); in dump_ghcb()
2370 ghcb->save.sw_scratch, ghcb_sw_scratch_is_valid(ghcb)); in dump_ghcb()
2377 struct ghcb *ghcb = svm->sev_es.ghcb; in sev_es_sync_to_ghcb() local
2397 struct ghcb *ghcb = svm->sev_es.ghcb; in sev_es_sync_from_ghcb() local
2435 memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in sev_es_sync_from_ghcb()
2441 struct ghcb *ghcb; in sev_es_validate_vmgexit() local
2445 ghcb = svm->sev_es.ghcb; in sev_es_validate_vmgexit()
2561 memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in sev_es_validate_vmgexit()
2629 struct ghcb *ghcb = svm->sev_es.ghcb; in setup_vmgexit_scratch() local
[all …]
A Dsvm.h191 struct ghcb *ghcb; member
A Dsvm.c2836 if (!err || !sev_es_guest(vcpu->kvm) || WARN_ON_ONCE(!svm->sev_es.ghcb)) in svm_complete_emulated_msr()
2839 ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, 1); in svm_complete_emulated_msr()
2840 ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, in svm_complete_emulated_msr()
/linux-6.3-rc2/arch/x86/include/asm/
A Dsvm.h493 struct ghcb { struct
553 BUILD_BUG_RESERVED_OFFSET(ghcb, 0xff0); in __unused_size_checks()
624 static __always_inline bool ghcb_##field##_is_valid(const struct ghcb *ghcb) \
627 (unsigned long *)&ghcb->save.valid_bitmap); \
630 static __always_inline u64 ghcb_get_##field(struct ghcb *ghcb) \
632 return ghcb->save.field; \
635 static __always_inline u64 ghcb_get_##field##_if_valid(struct ghcb *ghcb) \
637 return ghcb_##field##_is_valid(ghcb) ? ghcb->save.field : 0; \
640 static __always_inline void ghcb_set_##field(struct ghcb *ghcb, u64 value) \
643 (unsigned long *)&ghcb->save.valid_bitmap); \
[all …]
A Dx86_init.h7 struct ghcb;
265 void (*sev_es_hcall_prepare)(struct ghcb *ghcb, struct pt_regs *regs);
266 bool (*sev_es_hcall_finish)(struct ghcb *ghcb, struct pt_regs *regs);
/linux-6.3-rc2/arch/x86/boot/compressed/
A Dsev.c28 struct ghcb boot_ghcb_page __aligned(PAGE_SIZE);
29 struct ghcb *boot_ghcb;
211 static void __noreturn sev_es_ghcb_terminate(struct ghcb *ghcb, unsigned int set, in sev_es_ghcb_terminate() argument
216 vc_ghcb_invalidate(ghcb); in sev_es_ghcb_terminate()
217 ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_TERM_REQUEST); in sev_es_ghcb_terminate()
218 ghcb_set_sw_exit_info_1(ghcb, exit_info_1); in sev_es_ghcb_terminate()
219 ghcb_set_sw_exit_info_2(ghcb, exit_info_2); in sev_es_ghcb_terminate()
221 sev_es_wr_ghcb_msr(__pa(ghcb)); in sev_es_ghcb_terminate()
/linux-6.3-rc2/arch/x86/kvm/
A Dtrace.h1742 TP_PROTO(unsigned int vcpu_id, struct ghcb *ghcb),
1743 TP_ARGS(vcpu_id, ghcb),
1754 __entry->exit_reason = ghcb->save.sw_exit_code;
1755 __entry->info1 = ghcb->save.sw_exit_info_1;
1756 __entry->info2 = ghcb->save.sw_exit_info_2;
1768 TP_PROTO(unsigned int vcpu_id, struct ghcb *ghcb),
1769 TP_ARGS(vcpu_id, ghcb),
1780 __entry->exit_reason = ghcb->save.sw_exit_code;
1781 __entry->info1 = ghcb->save.sw_exit_info_1;
1782 __entry->info2 = ghcb->save.sw_exit_info_2;

Completed in 38 milliseconds