From: xulei stone.xulei@huawei.com
virt inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4NP0K CVE: NA -------------------
fix losing SMI problem
Signed-off-by: xulei stone.xulei@huawei.com Signed-off-by: Jingyi Wang wangjingyi11@huawei.com Reviewed-by: Zenghui Yu yuzenghui@huawei.com Reviewed-by: Wei Li liwei391@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- arch/x86/kvm/x86.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 12db47c8bd3f..e33414f36dba 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4227,6 +4227,11 @@ static int kvm_vcpu_ioctl_nmi(struct kvm_vcpu *vcpu)
static int kvm_vcpu_ioctl_smi(struct kvm_vcpu *vcpu) { + if (is_smm(vcpu)) { + vcpu->arch.hflags &= ~HF_SMM_MASK; + vcpu->arch.smi_pending = 0; + } + kvm_make_request(KVM_REQ_SMI, vcpu);
return 0;