[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26ec85d5-dd44-2364-1f8c-064de262cf8f@redhat.com>
Date: Tue, 5 Apr 2022 17:41:51 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: isaku.yamahata@...el.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: isaku.yamahata@...il.com, Jim Mattson <jmattson@...gle.com>,
erdemaktas@...gle.com, Connor Kuehl <ckuehl@...hat.com>,
Sean Christopherson <seanjc@...gle.com>
Subject: Re: [RFC PATCH v5 100/104] KVM: TDX: Silently discard SMI request
On 3/4/22 20:49, isaku.yamahata@...el.com wrote:
> From: Isaku Yamahata <isaku.yamahata@...el.com>
>
> TDX doesn't support system-management mode (SMM) and system-management
> interrupt (SMI) in guest TDs. Because guest state (vcpu state, memory
> state) is protected, it must go through the TDX module APIs to change guest
> state, injecting SMI and changing vcpu mode into SMM. The TDX module
> doesn't provide a way for VMM to inject SMI into guest TD and a way for VMM
> to switch guest vcpu mode into SMM.
>
> We have two options in KVM when handling SMM or SMI in the guest TD or the
> device model (e.g. QEMU): 1) silently ignore the request or 2) return a
> meaningful error.
>
> For simplicity, we implemented the option 1).
Please also:
1) return zero from vmx_has_emulated_msr(MSR_IA32_SMBASE) for TDX
virtual machines.
2) do a check for static_call(kvm_x86_has_emulated_msr)(kvm,
MSR_IA32_SMBASE) in kvm_vcpu_ioctl_smi and __apic_accept_irq.
3) WARN_ON_ONCE in tdx_smi_allowed and tdx_enable_smi_window.
Paolo
Powered by blists - more mailing lists