From: Jan Kiszka Date: Wed, 9 Feb 2011 14:11:28 +0000 (+0100) Subject: KVM: Start lock documentation X-Git-Tag: v3.0~1546^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38a778aa1899b9c6cf3e300a02782c9b78c547ab;p=platform%2Fkernel%2Flinux-amlogic.git KVM: Start lock documentation The goal of this document shall be - overview of all locks used in KVM core - provide details on the scope of each lock - explain the lock type, specifically of a raw spin locks - provide a lock ordering guide Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- diff --git a/Documentation/kvm/locking.txt b/Documentation/kvm/locking.txt new file mode 100644 index 0000000..3b4cd3b --- /dev/null +++ b/Documentation/kvm/locking.txt @@ -0,0 +1,25 @@ +KVM Lock Overview +================= + +1. Acquisition Orders +--------------------- + +(to be written) + +2. Reference +------------ + +Name: kvm_lock +Type: raw_spinlock +Arch: any +Protects: - vm_list + - hardware virtualization enable/disable +Comment: 'raw' because hardware enabling/disabling must be atomic /wrt + migration. + +Name: kvm_arch::tsc_write_lock +Type: raw_spinlock +Arch: x86 +Protects: - kvm_arch::{last_tsc_write,last_tsc_nsec,last_tsc_offset} + - tsc offset in vmcb +Comment: 'raw' because updating the tsc offsets must not be preempted.