KVM: Update Posted-Interrupts Descriptor when vCPU is preempted
authorFeng Wu <feng.wu@intel.com>
Fri, 18 Sep 2015 14:29:54 +0000 (22:29 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 1 Oct 2015 13:06:53 +0000 (15:06 +0200)
commit28b835d60fcc2498e717cf5e6f0c3691c24546f7
tree9c68fea3ea7c71f850c5c01b58173c66299142b8
parent87276880065246ce49ec571130d3d1e4a22e5604
KVM: Update Posted-Interrupts Descriptor when vCPU is preempted

This patch updates the Posted-Interrupts Descriptor when vCPU
is preempted.

sched out:
- Set 'SN' to suppress furture non-urgent interrupts posted for
the vCPU.

sched in:
- Clear 'SN'
- Change NDST if vCPU is scheduled to a different CPU
- Set 'NV' to POSTED_INTR_VECTOR

Signed-off-by: Feng Wu <feng.wu@intel.com>
[Include asm/cpu.h to fix !CONFIG_SMP compilation. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c