]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/kvm_host.h
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / include / linux / kvm_host.h
index a020fb280540ddf79297d2f01eb5ac6214107fd8..928b0d59e9ba07d64686975f5db6022ad608ef8d 100644 (file)
@@ -35,6 +35,7 @@
  * vcpu->requests bit members
  */
 #define KVM_REQ_TLB_FLUSH          0
+#define KVM_REQ_MIGRATE_TIMER      1
 #define KVM_REQ_REPORT_TPR_ACCESS  2
 
 struct kvm_vcpu;
@@ -104,7 +105,9 @@ struct kvm_memory_slot {
 };
 
 struct kvm {
-       struct mutex lock; /* protects everything except vcpus */
+       struct mutex lock; /* protects the vcpus array and APIC accesses */
+       spinlock_t mmu_lock;
+       struct rw_semaphore slots_lock;
        struct mm_struct *mm; /* userspace tied to this vm */
        int nmemslots;
        struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS +
@@ -276,6 +279,11 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn)
        return (gpa_t)gfn << PAGE_SHIFT;
 }
 
+static inline void kvm_migrate_apic_timer(struct kvm_vcpu *vcpu)
+{
+       set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests);
+}
+
 enum kvm_stat_kind {
        KVM_STAT_VM,
        KVM_STAT_VCPU,