WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Remove obsolete MMUEXT_REASSIGN_PAGE. It's not used by

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove obsolete MMUEXT_REASSIGN_PAGE. It's not used by
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Dec 2005 20:42:07 +0000
Delivery-date: Wed, 21 Dec 2005 20:45:12 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID a4de51a2629f10bb12b2cea7dc4d2d5747e6ca78
# Parent  b3edbeea3e797b7e56d13ab7ae126fbcd1fb6a70
Remove obsolete MMUEXT_REASSIGN_PAGE. It's not used by
anyone and is superceded by grant transfers.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r b3edbeea3e79 -r a4de51a2629f xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Dec 21 17:45:43 2005
+++ b/xen/arch/x86/mm.c Wed Dec 21 18:10:53 2005
@@ -1930,105 +1930,6 @@
             }
             break;
         }
-
-        case MMUEXT_REASSIGN_PAGE:
-            if ( unlikely(!IS_PRIV(d)) )
-            {
-                MEM_LOG("Dom %u has no reassignment priv", d->domain_id);
-                okay = 0;
-                break;
-            }
-            
-            e = percpu_info[cpu].foreign;
-            if ( unlikely(e == NULL) )
-            {
-                MEM_LOG("No FOREIGNDOM to reassign mfn %lx to", mfn);
-                okay = 0;
-                break;
-            }
-            
-            /*
-             * Grab both page_list locks, in order. This prevents the page from
-             * disappearing elsewhere while we modify the owner, and we'll need
-             * both locks if we're successful so that we can change lists.
-             */
-            if ( d < e )
-            {
-                spin_lock(&d->page_alloc_lock);
-                spin_lock(&e->page_alloc_lock);
-            }
-            else
-            {
-                spin_lock(&e->page_alloc_lock);
-                spin_lock(&d->page_alloc_lock);
-            }
-            
-            /*
-             * Check that 'e' will accept the page and has reservation
-             * headroom. Also, a domain mustn't have PGC_allocated pages when
-             * it is dying. 
-             */
-            ASSERT(e->tot_pages <= e->max_pages);
-            if ( unlikely(test_bit(_DOMF_dying, &e->domain_flags)) ||
-                 unlikely(e->tot_pages == e->max_pages) ||
-                 unlikely(IS_XEN_HEAP_FRAME(page)) )
-            {
-                MEM_LOG("Transferee has no reservation headroom (%d,%d), or "
-                        "page is in Xen heap (%lx), or dom is dying (%ld).",
-                        e->tot_pages, e->max_pages, mfn, e->domain_flags);
-                okay = 0;
-                goto reassign_fail;
-            }
-
-            /*
-             * The tricky bit: atomically change owner while there is just one
-             * benign reference to the page (PGC_allocated). If that reference
-             * disappears then the deallocation routine will safely spin.
-             */
-            _d  = pickle_domptr(d);
-            _nd = page->u.inuse._domain;
-            y   = page->count_info;
-            do {
-                x = y;
-                if ( unlikely((x & (PGC_count_mask|PGC_allocated)) != 
-                              (1|PGC_allocated)) ||
-                     unlikely(_nd != _d) )
-                {
-                    MEM_LOG("Bad page values %lx: ed=%p(%u), sd=%p,"
-                            " caf=%08x, taf=%" PRtype_info,
-                            page_to_pfn(page), d, d->domain_id,
-                            unpickle_domptr(_nd), x, page->u.inuse.type_info);
-                    okay = 0;
-                    goto reassign_fail;
-                }
-                __asm__ __volatile__(
-                    LOCK_PREFIX "cmpxchg8b %3"
-                    : "=d" (_nd), "=a" (y), "=c" (e),
-                    "=m" (*(volatile u64 *)(&page->count_info))
-                    : "0" (_d), "1" (x), "c" (e), "b" (x) );
-            } 
-            while ( unlikely(_nd != _d) || unlikely(y != x) );
-            
-            /*
-             * Unlink from 'd'. We transferred at least one reference to 'e',
-             * so noone else is spinning to try to delete this page from 'd'.
-             */
-            d->tot_pages--;
-            list_del(&page->list);
-            
-            /*
-             * Add the page to 'e'. Someone may already have removed the last
-             * reference and want to remove the page from 'e'. However, we have
-             * the lock so they'll spin waiting for us.
-             */
-            if ( unlikely(e->tot_pages++ == 0) )
-                get_knownalive_domain(e);
-            list_add_tail(&page->list, &e->page_list);
-            
-        reassign_fail:        
-            spin_unlock(&d->page_alloc_lock);
-            spin_unlock(&e->page_alloc_lock);
-            break;
             
         default:
             MEM_LOG("Invalid extended pt command 0x%x", op.cmd);
diff -r b3edbeea3e79 -r a4de51a2629f xen/include/public/xen.h
--- a/xen/include/public/xen.h  Wed Dec 21 17:45:43 2005
+++ b/xen/include/public/xen.h  Wed Dec 21 18:10:53 2005
@@ -145,10 +145,6 @@
  * cmd: MMUEXT_SET_LDT
  * linear_addr: Linear address of LDT base (NB. must be page-aligned).
  * nr_ents: Number of entries in LDT.
- * 
- * cmd: MMUEXT_REASSIGN_PAGE
- * mfn: Machine frame number to be reassigned to the FD.
- *      (NB. page must currently belong to the calling domain).
  */
 #define MMUEXT_PIN_L1_TABLE      0
 #define MMUEXT_PIN_L2_TABLE      1
@@ -164,14 +160,13 @@
 #define MMUEXT_INVLPG_ALL       11
 #define MMUEXT_FLUSH_CACHE      12
 #define MMUEXT_SET_LDT          13
-#define MMUEXT_REASSIGN_PAGE    14
 #define MMUEXT_NEW_USER_BASEPTR 15
 
 #ifndef __ASSEMBLY__
 struct mmuext_op {
     unsigned int cmd;
     union {
-        /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR, REASSIGN_PAGE */
+        /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR */
         unsigned long mfn;
         /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
         unsigned long linear_addr;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove obsolete MMUEXT_REASSIGN_PAGE. It's not used by, Xen patchbot -unstable <=