Home
last modified time | relevance | path

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

/linux/arch/x86/coco/sev/
A Dcore.c133 struct ghcb *ghcb; member
251 struct ghcb *ghcb; in __sev_get_ghcb() local
647 struct ghcb *ghcb; in __sev_put_ghcb() local
673 struct ghcb *ghcb; in svsm_perform_call_protocol() local
710 struct ghcb *ghcb; in __sev_es_nmi_complete() local
781 struct ghcb *ghcb; in get_jump_table_addr() local
905 struct ghcb *ghcb; in __set_pages_state() local
1106 struct ghcb *ghcb; in wakeup_cpu_via_vmgexit() local
1373 struct ghcb *ghcb; in snp_register_per_cpu_ghcb() local
1427 struct ghcb *ghcb; in sev_es_ap_hlt_loop() local
[all …]
A Dshared.c193 static __always_inline void vc_ghcb_invalidate(struct ghcb *ghcb) in vc_ghcb_invalidate() argument
196 __builtin_memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in vc_ghcb_invalidate()
374 static enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb, in sev_es_ghcb_hv_call() argument
466 return ghcb ? __sev_cpuid_hv_ghcb(ghcb, ctxt, leaf) in sev_cpuid_hv()
579 static int snp_cpuid_postprocess(struct ghcb *ghcb, struct es_em_ctxt *ctxt, in snp_cpuid_postprocess() argument
1017 sw_scratch = __pa(ghcb) + offsetof(struct ghcb, shared_buffer); in vc_handle_ioio()
1075 static int vc_handle_cpuid_snp(struct ghcb *ghcb, struct es_em_ctxt *ctxt) in vc_handle_cpuid_snp() argument
1094 static enum es_result vc_handle_cpuid(struct ghcb *ghcb, in vc_handle_cpuid() argument
1136 static enum es_result vc_handle_rdtsc(struct ghcb *ghcb, in vc_handle_rdtsc() argument
1147 if (!(ghcb_rax_is_valid(ghcb) && ghcb_rdx_is_valid(ghcb) && in vc_handle_rdtsc()
[all …]
/linux/arch/x86/kernel/cpu/
A Dvmware.c545 static void vmware_sev_es_hcall_prepare(struct ghcb *ghcb, in vmware_sev_es_hcall_prepare() argument
549 ghcb_set_rip(ghcb, regs->ip); in vmware_sev_es_hcall_prepare()
550 ghcb_set_rbx(ghcb, regs->bx); in vmware_sev_es_hcall_prepare()
551 ghcb_set_rcx(ghcb, regs->cx); in vmware_sev_es_hcall_prepare()
552 ghcb_set_rdx(ghcb, regs->dx); in vmware_sev_es_hcall_prepare()
553 ghcb_set_rsi(ghcb, regs->si); in vmware_sev_es_hcall_prepare()
554 ghcb_set_rdi(ghcb, regs->di); in vmware_sev_es_hcall_prepare()
555 ghcb_set_rbp(ghcb, regs->bp); in vmware_sev_es_hcall_prepare()
558 static bool vmware_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in vmware_sev_es_hcall_finish() argument
568 regs->bx = ghcb_get_rbx(ghcb); in vmware_sev_es_hcall_finish()
[all …]
A Dmshyperv.c629 static void hv_sev_es_hcall_prepare(struct ghcb *ghcb, struct pt_regs *regs) in hv_sev_es_hcall_prepare() argument
632 ghcb_set_rcx(ghcb, regs->cx); in hv_sev_es_hcall_prepare()
633 ghcb_set_rdx(ghcb, regs->dx); in hv_sev_es_hcall_prepare()
634 ghcb_set_r8(ghcb, regs->r8); in hv_sev_es_hcall_prepare()
637 static bool hv_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in hv_sev_es_hcall_finish() argument
/linux/arch/x86/hyperv/
A Divm.c33 struct ghcb ghcb; member
101 hv_ghcb->ghcb.ghcb_usage = 0xffffffff; in hv_ghcb_hypercall()
102 memset(hv_ghcb->ghcb.save.valid_bitmap, 0, in hv_ghcb_hypercall()
122 static enum es_result hv_ghcb_hv_call(struct ghcb *ghcb, u64 exit_code, in hv_ghcb_hv_call() argument
126 ghcb->protocol_version = hv_ghcb_version; in hv_ghcb_hv_call()
127 ghcb->ghcb_usage = GHCB_DEFAULT_USAGE; in hv_ghcb_hv_call()
129 ghcb_set_sw_exit_code(ghcb, exit_code); in hv_ghcb_hv_call()
130 ghcb_set_sw_exit_info_1(ghcb, exit_info_1); in hv_ghcb_hv_call()
131 ghcb_set_sw_exit_info_2(ghcb, exit_info_2); in hv_ghcb_hv_call()
205 ghcb_set_rcx(&hv_ghcb->ghcb, msr); in hv_ghcb_msr_write()
[all …]
/linux/arch/x86/boot/compressed/
A Dsev.c29 static struct ghcb boot_ghcb_page __aligned(PAGE_SIZE);
30 struct ghcb *boot_ghcb;
144 struct ghcb *ghcb; in svsm_perform_call_protocol() local
148 ghcb = boot_ghcb; in svsm_perform_call_protocol()
150 ghcb = NULL; in svsm_perform_call_protocol()
153 ret = ghcb ? svsm_perform_ghcb_protocol(ghcb, call) in svsm_perform_call_protocol()
313 static void __noreturn sev_es_ghcb_terminate(struct ghcb *ghcb, unsigned int set, in sev_es_ghcb_terminate() argument
318 vc_ghcb_invalidate(ghcb); in sev_es_ghcb_terminate()
320 ghcb_set_sw_exit_info_1(ghcb, exit_info_1); in sev_es_ghcb_terminate()
321 ghcb_set_sw_exit_info_2(ghcb, exit_info_2); in sev_es_ghcb_terminate()
[all …]
/linux/arch/x86/include/asm/
A Dsvm.h508 struct ghcb { struct
583 BUILD_BUG_RESERVED_OFFSET(ghcb, 0xff0); in __unused_size_checks()
647 static __always_inline bool ghcb_##field##_is_valid(const struct ghcb *ghcb) \
650 (unsigned long *)&ghcb->save.valid_bitmap); \
653 static __always_inline u64 ghcb_get_##field(struct ghcb *ghcb) \
655 return ghcb->save.field; \
658 static __always_inline u64 ghcb_get_##field##_if_valid(struct ghcb *ghcb) \
660 return ghcb_##field##_is_valid(ghcb) ? ghcb->save.field : 0; \
663 static __always_inline void ghcb_set_##field(struct ghcb *ghcb, u64 value) \
666 (unsigned long *)&ghcb->save.valid_bitmap); \
[all …]
A Dx86_init.h5 struct ghcb;
282 void (*sev_es_hcall_prepare)(struct ghcb *ghcb, struct pt_regs *regs);
283 bool (*sev_es_hcall_finish)(struct ghcb *ghcb, struct pt_regs *regs);
/linux/arch/x86/kvm/svm/
A Dsev.c3201 struct ghcb *ghcb = svm->sev_es.ghcb; in dump_ghcb() local
3214 ghcb->save.sw_exit_code, ghcb_sw_exit_code_is_valid(ghcb)); in dump_ghcb()
3216 ghcb->save.sw_exit_info_1, ghcb_sw_exit_info_1_is_valid(ghcb)); in dump_ghcb()
3218 ghcb->save.sw_exit_info_2, ghcb_sw_exit_info_2_is_valid(ghcb)); in dump_ghcb()
3220 ghcb->save.sw_scratch, ghcb_sw_scratch_is_valid(ghcb)); in dump_ghcb()
3227 struct ghcb *ghcb = svm->sev_es.ghcb; in sev_es_sync_to_ghcb() local
3247 struct ghcb *ghcb = svm->sev_es.ghcb; in sev_es_sync_from_ghcb() local
3265 memcpy(&svm->sev_es.valid_bitmap, &ghcb->save.valid_bitmap, sizeof(ghcb->save.valid_bitmap)); in sev_es_sync_from_ghcb()
3289 memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in sev_es_sync_from_ghcb()
3448 if (!svm->sev_es.ghcb) in sev_es_unmap_ghcb()
[all …]
A Dsvm.h218 struct ghcb *ghcb; member
812 …static __always_inline u64 kvm_ghcb_get_##field##_if_valid(struct vcpu_svm *svm, struct ghcb *ghcb
814 return kvm_ghcb_##field##_is_valid(svm) ? ghcb->save.field : 0; \
A Dsvm.c2975 if (!err || !sev_es_guest(vcpu->kvm) || WARN_ON_ONCE(!svm->sev_es.ghcb)) in svm_complete_emulated_msr()
2978 ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, 1); in svm_complete_emulated_msr()
2979 ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, in svm_complete_emulated_msr()
/linux/arch/x86/kernel/
A Dkvm.c990 static void kvm_sev_es_hcall_prepare(struct ghcb *ghcb, struct pt_regs *regs) in kvm_sev_es_hcall_prepare() argument
993 ghcb_set_rbx(ghcb, regs->bx); in kvm_sev_es_hcall_prepare()
994 ghcb_set_rcx(ghcb, regs->cx); in kvm_sev_es_hcall_prepare()
995 ghcb_set_rdx(ghcb, regs->dx); in kvm_sev_es_hcall_prepare()
996 ghcb_set_rsi(ghcb, regs->si); in kvm_sev_es_hcall_prepare()
999 static bool kvm_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in kvm_sev_es_hcall_finish() argument
/linux/arch/x86/kvm/
A Dtrace.h1751 TP_PROTO(unsigned int vcpu_id, struct ghcb *ghcb),
1752 TP_ARGS(vcpu_id, ghcb),
1763 __entry->exit_reason = ghcb->save.sw_exit_code;
1764 __entry->info1 = ghcb->save.sw_exit_info_1;
1765 __entry->info2 = ghcb->save.sw_exit_info_2;
1777 TP_PROTO(unsigned int vcpu_id, struct ghcb *ghcb),
1778 TP_ARGS(vcpu_id, ghcb),
1789 __entry->exit_reason = ghcb->save.sw_exit_code;
1790 __entry->info1 = ghcb->save.sw_exit_info_1;
1791 __entry->info2 = ghcb->save.sw_exit_info_2;

Completed in 55 milliseconds