aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorHerongguang (Stephen) <herongguang.he@huawei.com>2016-09-22 15:56:28 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2016-09-22 20:20:53 +0200
commit68c6efe07a4729b54947658df4fceed84f3d0fef (patch)
tree79883a76dc08f8b46bf59b836755d2d2b9b58626 /target-i386
parent6867783a804b5b7eb34a2e6f0d43d0eaf88ad2de (diff)
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 <herongguang.he@huawei.com> Message-Id: <57E38EAC.3020108@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/kvm.c2
1 files changed, 1 insertions, 1 deletions
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;