Re: [PATCH v19 095/130] KVM: VMX: Modify NMI and INTR handlers to take intr_info as function argument

Chao Gao
2024-03-29T02:55:15Z

On Mon, Feb 26, 2024 at 12:26:37AM -0800, isaku.yamahata@intel.com wrote:
>From: Sean Christopherson <sean.j.christopherson@intel.com>
>
>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@intel.com>
>Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Chao Gao <chao.gao@intel.com>