Re: [PATCH v19 116/130] KVM: TDX: Silently discard SMI request

Paolo Bonzini
2024-06-12T16:06:24Z

On Wed, Jun 12, 2024 at 3:06 PM Binbin Wu <binbin.wu@linux.intel.com> wrote:
> On 6/11/2024 10:11 PM, Paolo Bonzini wrote:
> > On Tue, Jun 11, 2024 at 3:18 PM Binbin Wu <binbin.wu@linux.intel.com> wrote:
> > > is_td_vcpu() is defined in tdx.h.
> > > Do you mind using open code to check whether the VM is TD in vmx.c?
> > > "vcpu->kvm->arch.vm_type == KVM_X86_TDX_VM"
> > I'd move it to some place that main.c can see.
>
> is_td_vcpu() can be seen in main.c

Ok.

> > Or vmx.c as Sean says
> > below, but I am not sure I like the idea too much.
>
> Which you may not like? Remove the vt_* wrapper or use KVM_BUG_ON()?

Removing the vt_* wrapper.

Paolo