Re: [PATCH V8.1 5/9] x86/sev-es: Expose sev_es_ghcb_hv_call() to call ghcb hv call out of sev code

From: Borislav Petkov
Date: Sat Oct 23 2021 - 13:36:38 EST


On Fri, Oct 22, 2021 at 08:58:00PM +0000, Michael Kelley wrote:
> > static inline void sev_es_ist_enter(struct pt_regs *regs) { }
> > static inline void sev_es_ist_exit(void) { }
> > static inline int sev_es_setup_ap_jump_table(struct real_mode_header *rmh) { return 0; }
> > static inline void sev_es_nmi_complete(void) { }
> > static inline int sev_es_efi_map_ghcbs(pgd_t *pgd) { return 0; }
> > +static inline enum
> > +es_result sev_es_ghcb_hv_call(struct ghcb *ghcb,
> > + bool set_ghcb_msr, u64 exit_code,
>
> The "struct es_em_ctxt *ctxt" argument is missing from this declaration,
> which would presumably produce a compile error.

Which raises the more important question: that ivm.c thing which is
going to be that function's user gets enabled unconditionally in
HyperV's Makefile so maybe you guys wanna consider perhaps making that
isolation VM functionality dependent on CONFIG_AMD_MEM_ENCRYPT because
without it, it would be useless.

And if you add that dependency, you probably won't need the stub as
outside of AMD SEV, nothing else will be using that function.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette