Re: [PATCH v4 0/6] KVM: x86: Prep KVM hypercall handling for TDX
From: Huang, Kai
Date: Wed Nov 27 2024 - 20:07:11 EST
On Wed, 2024-11-27 at 16:43 -0800, Sean Christopherson wrote:
> Effectively v4 of Binbin's series to handle hypercall exits to userspace in
> a generic manner, so that TDX
>
> Binbin and Kai, this is fairly different that what we last discussed. While
> sorting through Binbin's latest patch, I stumbled on what I think/hope is an
> approach that will make life easier for TDX. Rather than have common code
> set the return value, _and_ have TDX implement a callback to do the same for
> user return MSRs, just use the callback for all paths.
>
> As for abusing vcpu->run->hypercall.ret... It's obviously a bit gross, but
> I think it's a lesser evil than having multiple a one-line wrappers just to
> trampoline in the return code.
Doesn't seem to be "gross" to me, and AFAICT now for TDX we just need to play
with __kvm_emulate_hypercall() with a TDX-specific completion callback.
Which is nice. Thanks!
For this series:
Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>