]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/kvm/vmx.c
KVM: VMX: simplify and fix vmx_vcpu_pi_load
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Jun 2017 10:57:06 +0000 (12:57 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Oct 2017 21:20:42 +0000 (16:20 -0500)
commit5f19dac45b3d94e843b1b1e5bbbbd558d090ed67
tree4e190d7a691561a3d9f94721d94ab7f5099332a6
parent3f74e7f3f1294b4786e8e961a265180ab30cbca0
KVM: VMX: simplify and fix vmx_vcpu_pi_load

BugLink: http://bugs.launchpad.net/bugs/1721777
commit 31afb2ea2b10a7d17ce3db4cdb0a12b63b2fe08a upstream.

The simplify part: do not touch pi_desc.nv, we can set it when the
VCPU is first created.  Likewise, pi_desc.sn is only handled by
vmx_vcpu_pi_load, do not touch it in __pi_post_block.

The fix part: do not check kvm_arch_has_assigned_device, instead
check the SN bit to figure out whether vmx_vcpu_pi_put ran before.
This matches what the previous patch did in pi_post_block.

Cc: Huangweidong <weidong.huang@huawei.com>
Cc: Gonglei <arei.gonglei@huawei.com>
Cc: wangxin <wangxinxin.wang@huawei.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Tested-by: Longpeng (Mike) <longpeng2@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/x86/kvm/vmx.c