[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/p2m: drop second pass looking for shared pages.



commit 7bedbbb5c31ec7d7e653b4fc606c9871661d5e89
Author:     Tim Deegan <tim@xxxxxxx>
AuthorDate: Wed Dec 18 14:12:31 2013 +0000
Commit:     Tim Deegan <tim@xxxxxxx>
CommitDate: Thu Feb 27 12:28:41 2014 +0000

    x86/p2m: drop second pass looking for shared pages.
    
    We have run relinquish_shared_pages() already by the time this
    teardown happens, and page_make_sharable() exits early if the owning
    domain is dying.
    
    Signed-off-by: Tim Deegan <tim@xxxxxxx>
    Acked-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
---
 xen/arch/x86/mm/p2m.c |   21 +--------------------
 1 files changed, 1 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index d7dd480..c0ddef0 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -440,9 +440,6 @@ void p2m_teardown(struct p2m_domain *p2m)
 {
     struct page_info *pg;
     struct domain *d;
-    unsigned long gfn;
-    p2m_type_t t;
-    mfn_t mfn;
 
     if (p2m == NULL)
         return;
@@ -450,23 +447,7 @@ void p2m_teardown(struct p2m_domain *p2m)
     d = p2m->domain;
 
     p2m_lock(p2m);
-
-    /* Try to unshare any remaining shared p2m entries. Safeguard
-     * Since relinquish_shared_pages should have done the work. */ 
-    for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ )
-    {
-        p2m_access_t a;
-        if ( atomic_read(&d->shr_pages) == 0 )
-            break;
-        mfn = p2m->get_entry(p2m, gfn, &t, &a, 0, NULL);
-        if ( mfn_valid(mfn) && (t == p2m_ram_shared) )
-        {
-            ASSERT(!p2m_is_nestedp2m(p2m));
-            /* Does not fail with ENOMEM given the DESTROY flag */
-            BUG_ON(mem_sharing_unshare_page(d, gfn, MEM_SHARING_DESTROY_GFN));
-        }
-    }
-
+    ASSERT(atomic_read(&d->shr_pages) == 0);
     p2m->phys_table = pagetable_null();
 
     while ( (pg = page_list_remove_head(&p2m->pages)) )
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.