]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: X86: Reset the vcpu->run->flags at the beginning of vcpu_run
authorChenyi Qiang <chenyi.qiang@intel.com>
Fri, 6 Nov 2020 09:03:13 +0000 (17:03 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 10:27:21 +0000 (05:27 -0500)
commit197a8b57ca466114d3044e4873326615416b7247
tree26e27923e0e83b4639ebb41ee3f8d777641dfa8f
parentf46fb3a4546f7474ee9418b0610f558e58a673c6
KVM: X86: Reset the vcpu->run->flags at the beginning of vcpu_run

Reset the vcpu->run->flags at the beginning of kvm_arch_vcpu_ioctl_run.
It can avoid every thunk of code that needs to set the flag clear it,
which increases the odds of missing a case and ending up with a flag in
an undefined state.

Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Message-Id: <20201106090315.18606-3-chenyi.qiang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c