Re: [PATCH v4 2/9] KVM: TDX: Check if there is valid exit infos based on vp_enter_ret
"Edgecombe, Rick P" <[email protected]>
| Newsgroups | dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2026-08-19 at 17:48 +0800, Xiaoyao Li wrote:
> Check if there is valid exit info based on vp_enter_ret instead of relying
> on the clobbered Exit Reason, in tdx_get_exit_info().
>
> Current KVM uses "Exit Reason is not equal to the synthesized invalid
> Exit Reason, -1u," as the condition to identify there is a real TD Exit
> and valid exit infos. However, there is one issue with this approach:
> KVM updates the Exit Reason to the synthesized invalid Exit Reason for
> real EPT MISCONFIG as well. This is a false positive for real EPT
> MISCONFIG, which has valid exit infos.
>
> Though the issue can be addressed by changing the handling for real EPT
> MISCONFIG to not update the Exit Reason to the synthesized one, relying
> on the clobbered Exit Reason itself is brittle. Instead, check
> vp_enter_ret directly to identify if it is a valid Exit Reason.
>
> Fixes: da407fe45908 ("KVM: TDX: Handle EPT violation/misconfig exit")
> Cc: [email protected]
> Suggested-by: Sean Christopherson <[email protected]>
> Signed-off-by: Xiaoyao Li <[email protected]>
> ---
This series has grown unfortunately, and I wasn't able to catch up on the
threads from yesterday. Can we really not put this one in the non-stable patches
at the end? Or maybe you can explain why it's needed?
Also "KVM: VMX: Preserve negative return value in vmx_handle_exit() with bus
lock detected"?