On Mon, Feb 26, 2024 at 12:26:37AM -0800, isaku.yamahata@xxxxxxxxx wrote: >From: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> > >TDX uses different ABI to get information about VM exit. Pass intr_info to >the NMI and INTR handlers instead of pulling it from vcpu_vmx in >preparation for sharing the bulk of the handlers with TDX. > >When the guest TD exits to VMM, RAX holds status and exit reason, RCX holds >exit qualification etc rather than the VMCS fields because VMM doesn't have >access to the VMCS. The eventual code will be > >VMX: > - get exit reason, intr_info, exit_qualification, and etc from VMCS > - call NMI/INTR handlers (common code) > >TDX: > - get exit reason, intr_info, exit_qualification, and etc from guest > registers > - call NMI/INTR handlers (common code) > >Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> >Signed-off-by: Isaku Yamahata <isaku.yamahata@xxxxxxxxx> >Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Reviewed-by: Chao Gao <chao.gao@xxxxxxxxx>