summaryrefslogtreecommitdiff
path: root/Documentation/virtual/kvm/locking.txt
diff options
context:
space:
mode:
authorFeng Wu <feng.wu@intel.com>2015-09-18 22:29:55 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2015-10-01 15:06:53 +0200
commitbf9f6ac8d74969690df1485b33b7c238ca9f2269 (patch)
treecfaa21f2831d959dca9bdb4c4ad9e329fec4d5e8 /Documentation/virtual/kvm/locking.txt
parent28b835d60fcc2498e717cf5e6f0c3691c24546f7 (diff)
KVM: Update Posted-Interrupts Descriptor when vCPU is blocked
This patch updates the Posted-Interrupts Descriptor when vCPU is blocked. pre-block: - Add the vCPU to the blocked per-CPU list - Set 'NV' to POSTED_INTR_WAKEUP_VECTOR post-block: - Remove the vCPU from the per-CPU list Signed-off-by: Feng Wu <feng.wu@intel.com> [Concentrate invocation of pre/post-block hooks to vcpu_block. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation/virtual/kvm/locking.txt')
-rw-r--r--Documentation/virtual/kvm/locking.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt
index d68af4dc3006..19f94a6b9bb0 100644
--- a/Documentation/virtual/kvm/locking.txt
+++ b/Documentation/virtual/kvm/locking.txt
@@ -166,3 +166,15 @@ Comment: The srcu read lock must be held while accessing memslots (e.g.
MMIO/PIO address->device structure mapping (kvm->buses).
The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu
if it is needed by multiple functions.
+
+Name: blocked_vcpu_on_cpu_lock
+Type: spinlock_t
+Arch: x86
+Protects: blocked_vcpu_on_cpu
+Comment: This is a per-CPU lock and it is used for VT-d posted-interrupts.
+ When VT-d posted-interrupts is supported and the VM has assigned
+ devices, we put the blocked vCPU on the list blocked_vcpu_on_cpu
+ protected by blocked_vcpu_on_cpu_lock, when VT-d hardware issues
+ wakeup notification event since external interrupts from the
+ assigned devices happens, we will find the vCPU on the list to
+ wakeup.