KVM: x86/mmu: Store the address space ID in the TDP iterator
[linux-2.6-microblaze.git] / arch / x86 / kvm / mmu / mmu_internal.h
index ec4fc28..1f6f98c 100644 (file)
@@ -78,6 +78,11 @@ static inline struct kvm_mmu_page *sptep_to_sp(u64 *sptep)
        return to_shadow_page(__pa(sptep));
 }
 
+static inline int kvm_mmu_page_as_id(struct kvm_mmu_page *sp)
+{
+       return sp->role.smm ? 1 : 0;
+}
+
 static inline bool kvm_vcpu_ad_need_write_protect(struct kvm_vcpu *vcpu)
 {
        /*