Home
last modified time | relevance | path

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

/Linux-v5.10/arch/x86/kernel/
Dsev-es.c38 static struct ghcb boot_ghcb_page __bss_decrypted __aligned(PAGE_SIZE);
44 static struct ghcb __initdata *boot_ghcb;
48 struct ghcb ghcb_page;
67 struct ghcb backup_ghcb;
94 struct ghcb *ghcb; member
173 static __always_inline struct ghcb *sev_es_get_ghcb(struct ghcb_state *state) in sev_es_get_ghcb()
176 struct ghcb *ghcb; in sev_es_get_ghcb() local
179 ghcb = &data->ghcb_page; in sev_es_get_ghcb()
190 state->ghcb = &data->backup_ghcb; in sev_es_get_ghcb()
193 *state->ghcb = *ghcb; in sev_es_get_ghcb()
[all …]
Dsev-es-shared.c64 static __always_inline void vc_ghcb_invalidate(struct ghcb *ghcb) in vc_ghcb_invalidate() argument
66 memset(ghcb->save.valid_bitmap, 0, sizeof(ghcb->save.valid_bitmap)); in vc_ghcb_invalidate()
96 static enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb, in sev_es_ghcb_hv_call() argument
104 ghcb->protocol_version = GHCB_PROTOCOL_MAX; in sev_es_ghcb_hv_call()
105 ghcb->ghcb_usage = GHCB_DEFAULT_USAGE; in sev_es_ghcb_hv_call()
107 ghcb_set_sw_exit_code(ghcb, exit_code); in sev_es_ghcb_hv_call()
108 ghcb_set_sw_exit_info_1(ghcb, exit_info_1); in sev_es_ghcb_hv_call()
109 ghcb_set_sw_exit_info_2(ghcb, exit_info_2); in sev_es_ghcb_hv_call()
111 sev_es_wr_ghcb_msr(__pa(ghcb)); in sev_es_ghcb_hv_call()
114 if ((ghcb->save.sw_exit_info_1 & 0xffffffff) == 1) { in sev_es_ghcb_hv_call()
[all …]
Dkvm.c750 static void kvm_sev_es_hcall_prepare(struct ghcb *ghcb, struct pt_regs *regs) in kvm_sev_es_hcall_prepare() argument
753 ghcb_set_rbx(ghcb, regs->bx); in kvm_sev_es_hcall_prepare()
754 ghcb_set_rcx(ghcb, regs->cx); in kvm_sev_es_hcall_prepare()
755 ghcb_set_rdx(ghcb, regs->dx); in kvm_sev_es_hcall_prepare()
756 ghcb_set_rsi(ghcb, regs->si); in kvm_sev_es_hcall_prepare()
759 static bool kvm_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in kvm_sev_es_hcall_finish() argument
/Linux-v5.10/arch/x86/kernel/cpu/
Dvmware.c481 static void vmware_sev_es_hcall_prepare(struct ghcb *ghcb, in vmware_sev_es_hcall_prepare() argument
485 ghcb_set_rip(ghcb, regs->ip); in vmware_sev_es_hcall_prepare()
486 ghcb_set_rbx(ghcb, regs->bx); in vmware_sev_es_hcall_prepare()
487 ghcb_set_rcx(ghcb, regs->cx); in vmware_sev_es_hcall_prepare()
488 ghcb_set_rdx(ghcb, regs->dx); in vmware_sev_es_hcall_prepare()
489 ghcb_set_rsi(ghcb, regs->si); in vmware_sev_es_hcall_prepare()
490 ghcb_set_rdi(ghcb, regs->di); in vmware_sev_es_hcall_prepare()
491 ghcb_set_rbp(ghcb, regs->bp); in vmware_sev_es_hcall_prepare()
494 static bool vmware_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in vmware_sev_es_hcall_finish() argument
496 if (!(ghcb_rbx_is_valid(ghcb) && in vmware_sev_es_hcall_finish()
[all …]
/Linux-v5.10/arch/x86/include/asm/
Dx86_init.h7 struct ghcb;
248 void (*sev_es_hcall_prepare)(struct ghcb *ghcb, struct pt_regs *regs);
249 bool (*sev_es_hcall_finish)(struct ghcb *ghcb, struct pt_regs *regs);
Dsvm.h284 struct ghcb { struct
304 BUILD_BUG_ON(sizeof(struct ghcb) != EXPECTED_GHCB_SIZE); in __unused_size_checks() argument
376 static inline bool ghcb_##field##_is_valid(const struct ghcb *ghcb) \
379 (unsigned long *)&ghcb->save.valid_bitmap); \
382 static inline void ghcb_set_##field(struct ghcb *ghcb, u64 value) \
385 (unsigned long *)&ghcb->save.valid_bitmap); \
386 ghcb->save.field = value; \
/Linux-v5.10/arch/x86/boot/compressed/
Dsev-es.c26 struct ghcb boot_ghcb_page __aligned(PAGE_SIZE);
27 struct ghcb *boot_ghcb;