summaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorWanpeng Li <wanpengli@tencent.com>2019-06-11 20:23:48 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2019-07-02 18:56:01 +0200
commitf85f6e7bc9682a6d8b342c010cd6aa58521fdeec (patch)
tree5ca2f323769a35386e2a24b4c21d4c099778e950 /Documentation/virtual
parent11e349143e3289ab99f1b4858649f60703b7bf35 (diff)
downloadlinux-stable-f85f6e7bc9682a6d8b342c010cd6aa58521fdeec.tar.gz
linux-stable-f85f6e7bc9682a6d8b342c010cd6aa58521fdeec.tar.bz2
linux-stable-f85f6e7bc9682a6d8b342c010cd6aa58521fdeec.zip
KVM: X86: Yield to IPI target if necessary
When sending a call-function IPI-many to vCPUs, yield if any of the IPI target vCPUs was preempted, we just select the first preempted target vCPU which we found since the state of target vCPUs can change underneath and to avoid race conditions. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Liran Alon <liran.alon@oracle.com> Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation/virtual')
-rw-r--r--Documentation/virtual/kvm/hypercalls.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/hypercalls.txt b/Documentation/virtual/kvm/hypercalls.txt
index da24c138c8d1..da210651f714 100644
--- a/Documentation/virtual/kvm/hypercalls.txt
+++ b/Documentation/virtual/kvm/hypercalls.txt
@@ -141,3 +141,14 @@ a0 corresponds to the APIC ID in the third argument (a2), bit 1
corresponds to the APIC ID a2+1, and so on.
Returns the number of CPUs to which the IPIs were delivered successfully.
+
+7. KVM_HC_SCHED_YIELD
+------------------------
+Architecture: x86
+Status: active
+Purpose: Hypercall used to yield if the IPI target vCPU is preempted
+
+a0: destination APIC ID
+
+Usage example: When sending a call-function IPI-many to vCPUs, yield if
+any of the IPI target vCPUs was preempted.