From 68c6efe07a4729b54947658df4fceed84f3d0fef Mon Sep 17 00:00:00 2001 From: "Herongguang (Stephen)" Date: Thu, 22 Sep 2016 15:56:28 +0800 Subject: [PATCH] kvm: fix events.flags (KVM_VCPUEVENT_VALID_SMM) overwritten by 0 Fix events.flags (KVM_VCPUEVENT_VALID_SMM) overwritten by 0. Signed-off-by: He Rongguang Message-Id: <57E38EAC.3020108@huawei.com> Signed-off-by: Paolo Bonzini --- target-i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index f236dafae5..a0e42b2c4e 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -2452,6 +2452,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.nmi.pad = 0; events.sipi_vector = env->sipi_vector; + events.flags = 0; if (has_msr_smbase) { events.smi.smm = !!(env->hflags & HF_SMM_MASK); @@ -2471,7 +2472,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.flags |= KVM_VCPUEVENT_VALID_SMM; } - events.flags = 0; if (level >= KVM_PUT_RESET_STATE) { events.flags |= KVM_VCPUEVENT_VALID_NMI_PENDING | KVM_VCPUEVENT_VALID_SIPI_VECTOR;