Re: [PATCH v3 2/4] KVM: TDX: Set bits 31:16 to 0 for the synthesized Exit Reason
"Edgecombe, Rick P" <[email protected]>
| Newsgroups | org.kernel.vger.kvm,dev.linux.lists.linux-coco,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2026-08-12 at 16:02 +0800, 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. Drop it. > > Cc: [email protected] > Signed-off-by: Xiaoyao Li <[email protected]> > --- Reviewed-by: Rick Edgecombe <[email protected]>