Re: [PATCH 1/2] KVM: TDX: Enable Notify VM exit

Xiaoyao Li <[email protected]>
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/6/2026 9:33 PM, Nikolay Borisov wrote:
>> diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c
>> index 545b03d9d10b..cdc0d24657ac 100644
>> --- a/arch/x86/kvm/vmx/tdx.c
>> +++ b/arch/x86/kvm/vmx/tdx.c
>> @@ -2129,6 +2129,9 @@ int tdx_handle_exit(struct kvm_vcpu *vcpu, 
>> fastpath_t fastpath)
>>            * - If it's not an MSMI, no need to do anything here.
>>            */
>>           return 1;
>> +    case EXIT_REASON_NOTIFY:
>> +        /* NMI blocking state is handled by TDX module */
>> +        return __handle_notify(vcpu, false);
> 
> I'd rather there be a private handle_tdx_notify function in tdx.c than 
> exposing __handle_notify and introducing the boolean. This is needed 
> because the TDX module handles the NMI unblocking, so let's keep the 
> implementation specific to tdx.

The initial version just implemented a separate handler for TDX. It had 
the exact same code as VMX's handle_notify() except the "NMI blocking 
handling". So to eliminate the code duplication, I changed to current code.

Sean, please let me if you have a preference. Otherwise, I'll follow 
Nikolay's preference in a v2.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.