x86/EPT: also force EMT re-evaluation if pinned ranges change
authorJan Beulich <jbeulich@suse.com>
Fri, 2 May 2014 08:51:32 +0000 (10:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 May 2014 08:51:32 +0000 (10:51 +0200)
This was inadvertently left out of aa9114ed ("x86/EPT: force
re-evaluation of memory type as necessary"). Note that this
intentionally doesn't use memory_type_changed(): Changes to the pinned
ranges are independent of IOMMU presence, which that function uses to
determine whether to call the underlying p2m_memory_type_changed().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/hvm/mtrr.c

index 98a4f34793b30f0099a15fc322693eb55886f485..0ec38fcc21a7408c86cc87397f98b87b5d416e53 100644 (file)
@@ -651,6 +651,7 @@ int32_t hvm_set_mem_pinned_cacheattr(
                 rcu_read_unlock(&pinned_cacheattr_rcu_lock);
                 list_del_rcu(&range->list);
                 call_rcu(&range->rcu, free_pinned_cacheattr_entry);
+                p2m_memory_type_changed(d);
                 return 0;
             }
         rcu_read_unlock(&pinned_cacheattr_rcu_lock);
@@ -696,6 +697,7 @@ int32_t hvm_set_mem_pinned_cacheattr(
     range->type = type;
 
     list_add_rcu(&range->list, &d->arch.hvm_domain.pinned_cacheattr_ranges);
+    p2m_memory_type_changed(d);
 
     return 0;
 }