Re: [PATCH v4 3/9] KVM: TDX: Set bits 31:16 to 0 for the synthesized Exit Reason
Binbin Wu <[email protected]>
| Newsgroups | dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 8/19/2026 5:48 PM, Xiaoyao Li wrote: > Set bits 31:16 to 0 instead of all-1s for KVM's synthesized Exit Reason. > > KVM is going to support Bus Lock VM exit for TDX, after which bit 26 of > the Exit Reason becomes meaningful and indicates that a bus lock happened. > The existing synthesized Exit Reason, -1u, will cause a false positive in > that case. Change the synthesized Exit Reason from -1u to U16_MAX, so that > bits 31:16 are set to 0. This also avoids the potential issues when other > bits in 31:16 become valid in the future. > > As a bonus, the check for synthesized Exit Reason in tdx_failed_vmentry() > becomes unnecessary. Just drop it. > > Cc: [email protected] > Signed-off-by: Xiaoyao Li <[email protected]> > Reviewed-by: Rick Edgecombe <[email protected]> Reviewed-by: Binbin Wu <[email protected]>