/linux/arch/x86/kernel/ |
A D | sev.c | 83 struct ghcb *ghcb; member 172 struct ghcb *ghcb; in __sev_get_ghcb() local 203 *state->ghcb = *ghcb; in __sev_get_ghcb() 209 return ghcb; in __sev_get_ghcb() 491 struct ghcb *ghcb; in __sev_put_ghcb() local 500 *ghcb = *state->ghcb; in __sev_put_ghcb() 516 struct ghcb *ghcb; in __sev_es_nmi_complete() local 535 struct ghcb *ghcb; in get_jump_table_addr() local 678 struct ghcb *ghcb; in sev_es_ap_hlt_loop() local 1225 struct ghcb *ghcb, in vc_handle_exitcode() argument [all …]
|
A D | sev-shared.c | 64 static __always_inline void vc_ghcb_invalidate(struct ghcb *ghcb) in vc_ghcb_invalidate() argument 66 ghcb->save.sw_exit_code = 0; in vc_ghcb_invalidate() 67 __builtin_memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in vc_ghcb_invalidate() 97 static enum es_result verify_exception_info(struct ghcb *ghcb, struct es_em_ctxt *ctxt) in verify_exception_info() argument 128 enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb, bool set_ghcb_msr, in sev_es_ghcb_hv_call() argument 375 static enum es_result vc_handle_ioio(struct ghcb *ghcb, struct es_em_ctxt *ctxt) in vc_handle_ioio() argument 425 sw_scratch = __pa(ghcb) + offsetof(struct ghcb, shared_buffer); in vc_handle_ioio() 484 static enum es_result vc_handle_cpuid(struct ghcb *ghcb, in vc_handle_cpuid() argument 499 ghcb_set_xcr0(ghcb, 1); in vc_handle_cpuid() 519 static enum es_result vc_handle_rdtsc(struct ghcb *ghcb, in vc_handle_rdtsc() argument [all …]
|
A D | kvm.c | 923 static void kvm_sev_es_hcall_prepare(struct ghcb *ghcb, struct pt_regs *regs) in kvm_sev_es_hcall_prepare() argument 926 ghcb_set_rbx(ghcb, regs->bx); in kvm_sev_es_hcall_prepare() 927 ghcb_set_rcx(ghcb, regs->cx); in kvm_sev_es_hcall_prepare() 928 ghcb_set_rdx(ghcb, regs->dx); in kvm_sev_es_hcall_prepare() 929 ghcb_set_rsi(ghcb, regs->si); in kvm_sev_es_hcall_prepare() 932 static bool kvm_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in kvm_sev_es_hcall_finish() argument
|
/linux/arch/x86/kernel/cpu/ |
A D | vmware.c | 484 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/arch/x86/hyperv/ |
A D | ivm.c | 24 struct ghcb ghcb; member 76 hv_ghcb->ghcb.protocol_version = GHCB_PROTOCOL_MAX; in hv_ghcb_hypercall() 77 hv_ghcb->ghcb.ghcb_usage = GHCB_USAGE_HYPERV_CALL; in hv_ghcb_hypercall() 88 hv_ghcb->ghcb.ghcb_usage = 0xffffffff; in hv_ghcb_hypercall() 89 memset(hv_ghcb->ghcb.save.valid_bitmap, 0, in hv_ghcb_hypercall() 90 sizeof(hv_ghcb->ghcb.save.valid_bitmap)); in hv_ghcb_hypercall() 119 ghcb_set_rcx(&hv_ghcb->ghcb, msr); in hv_ghcb_msr_write() 120 ghcb_set_rax(&hv_ghcb->ghcb, lower_32_bits(value)); in hv_ghcb_msr_write() 121 ghcb_set_rdx(&hv_ghcb->ghcb, upper_32_bits(value)); in hv_ghcb_msr_write() 154 ghcb_set_rcx(&hv_ghcb->ghcb, msr); in hv_ghcb_msr_read() [all …]
|
/linux/arch/x86/kvm/svm/ |
A D | sev.c | 2268 struct ghcb *ghcb = svm->sev_es.ghcb; in dump_ghcb() local 2281 ghcb->save.sw_exit_code, ghcb_sw_exit_code_is_valid(ghcb)); in dump_ghcb() 2287 ghcb->save.sw_scratch, ghcb_sw_scratch_is_valid(ghcb)); in dump_ghcb() 2294 struct ghcb *ghcb = svm->sev_es.ghcb; in sev_es_sync_to_ghcb() local 2314 struct ghcb *ghcb = svm->sev_es.ghcb; in sev_es_sync_from_ghcb() local 2352 memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in sev_es_sync_from_ghcb() 2358 struct ghcb *ghcb; in sev_es_validate_vmgexit() local 2362 ghcb = svm->sev_es.ghcb; in sev_es_validate_vmgexit() 2478 memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in sev_es_validate_vmgexit() 2545 struct ghcb *ghcb = svm->sev_es.ghcb; in setup_vmgexit_scratch() local [all …]
|
A D | svm.h | 131 struct ghcb *ghcb; member
|
A D | svm.c | 2847 if (!err || !sev_es_guest(vcpu->kvm) || WARN_ON_ONCE(!svm->sev_es.ghcb)) in svm_complete_emulated_msr() 2850 ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, 1); in svm_complete_emulated_msr() 2851 ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, in svm_complete_emulated_msr()
|
/linux/arch/x86/include/asm/ |
A D | svm.h | 312 struct ghcb { struct 332 BUILD_BUG_ON(sizeof(struct ghcb) != EXPECTED_GHCB_SIZE); in __unused_size_checks() argument 403 static inline bool ghcb_##field##_is_valid(const struct ghcb *ghcb) \ 406 (unsigned long *)&ghcb->save.valid_bitmap); \ 409 static inline u64 ghcb_get_##field(struct ghcb *ghcb) \ 411 return ghcb->save.field; \ 414 static inline u64 ghcb_get_##field##_if_valid(struct ghcb *ghcb) \ 416 return ghcb_##field##_is_valid(ghcb) ? ghcb->save.field : 0; \ 419 static inline void ghcb_set_##field(struct ghcb *ghcb, u64 value) \ 422 (unsigned long *)&ghcb->save.valid_bitmap); \ [all …]
|
A D | x86_init.h | 7 struct ghcb; 250 void (*sev_es_hcall_prepare)(struct ghcb *ghcb, struct pt_regs *regs); 251 bool (*sev_es_hcall_finish)(struct ghcb *ghcb, struct pt_regs *regs);
|
A D | sev.h | 56 struct ghcb; 85 extern enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb,
|
/linux/arch/x86/boot/compressed/ |
A D | sev.c | 26 struct ghcb boot_ghcb_page __aligned(PAGE_SIZE); 27 struct ghcb *boot_ghcb;
|
/linux/arch/x86/kvm/ |
A D | trace.h | 1638 TP_PROTO(unsigned int vcpu_id, struct ghcb *ghcb), 1639 TP_ARGS(vcpu_id, ghcb), 1650 __entry->exit_reason = ghcb->save.sw_exit_code; 1651 __entry->info1 = ghcb->save.sw_exit_info_1; 1652 __entry->info2 = ghcb->save.sw_exit_info_2; 1664 TP_PROTO(unsigned int vcpu_id, struct ghcb *ghcb), 1665 TP_ARGS(vcpu_id, ghcb), 1676 __entry->exit_reason = ghcb->save.sw_exit_code; 1677 __entry->info1 = ghcb->save.sw_exit_info_1; 1678 __entry->info2 = ghcb->save.sw_exit_info_2;
|