Re: [RFC PATCH V6 01/14] x86/sev: Add a #HV exception handler

From: Dave Hansen
Date: Tue May 30 2023 - 11:20:56 EST


On 5/30/23 05:16, Gupta, Pankaj wrote:
> #HV handler handles both #NMI & #MCE in the guest and nested #HV is
> never raised by the hypervisor. Next #HV exception is only raised by the
> hypervisor when Guest acknowledges the pending #HV exception by clearing
> "NoFurtherSignal” bit in the doorbell page.

There's a big difference between "is never raised by" and "cannot be
raised by".

Either way, this series (and this patch in particular) needs some much
better changelogs so that this behavior is clear. It would also be nice
to reference the relevant parts of the hardware specs if the "hardware"*
is helping to provide these guarantees.

* I say "hardware" in quotes because on TDX a big chunk of this behavior
is implemented in software in the TDX module. SEV probably does it in
microcode (or maybe in the secure processor), but I kinda doubt it's
purely silicon.