Re: [PATCH v4 0/6] KVM: x86: Prep KVM hypercall handling for TDX

Sean Christopherson
2024-12-19T02:41:19Z

On Wed, 27 Nov 2024 16:43:38 -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.
>
> [...]

Applied patch 1 to kvm-x86 fixes. I'm going to hold off on the rest until the
dust settles on the SEAMCALL interfaces, e.g. in case TDX ends up marshalling
state into the "normal" GPRs.

[1/6] KVM: x86: Play nice with protected guests in complete_hypercall_exit()
https://github.com/kvm-x86/linux/commit/a317794eefd0
[2/6] KVM: x86: Add a helper to check for user interception of KVM hypercalls
(no commit info)
[3/6] KVM: x86: Move "emulate hypercall" function declarations to x86.h
(no commit info)
[4/6] KVM: x86: Bump hypercall stat prior to fully completing hypercall
(no commit info)
[5/6] KVM: x86: Always complete hypercall via function callback
(no commit info)
[6/6] KVM: x86: Refactor __kvm_emulate_hypercall() into a macro
(no commit info)

--