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

[Xen-changelog] [xen-unstable] Remove unused XENMEM_remove_from_physmap.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1231932277 0
# Node ID ee62aaafff46d29ab308dcab12b69f9f371afdb1
# Parent  2737293c761ef32092671b9c320ade3c8ec35b68
Remove unused XENMEM_remove_from_physmap.

Never present in any stable release of Xen. Introduced for use by
qemu-dm but now not needed.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxc/xc_private.c        |   10 ----------
 xen/arch/ia64/xen/mm.c          |   28 ----------------------------
 xen/arch/x86/mm.c               |   33 ---------------------------------
 xen/arch/x86/x86_64/compat/mm.c |   14 --------------
 xen/include/public/memory.h     |   16 ----------------
 xen/include/xlat.lst            |    1 -
 xen/include/xsm/xsm.h           |    6 ------
 xen/xsm/dummy.c                 |    5 -----
 xen/xsm/flask/hooks.c           |    6 ------
 9 files changed, 119 deletions(-)

diff -r 2737293c761e -r ee62aaafff46 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Wed Jan 14 11:15:01 2009 +0000
+++ b/tools/libxc/xc_private.c  Wed Jan 14 11:24:37 2009 +0000
@@ -307,13 +307,6 @@ int xc_memory_op(int xc_handle,
             goto out1;
         }
         break;
-    case XENMEM_remove_from_physmap:
-        if ( lock_pages(arg, sizeof(struct xen_remove_from_physmap)) )
-        {
-            PERROR("Could not lock");
-            goto out1;
-        }
-        break;
     case XENMEM_current_reservation:
     case XENMEM_maximum_reservation:
     case XENMEM_maximum_gpfn:
@@ -354,9 +347,6 @@ int xc_memory_op(int xc_handle,
         break;
     case XENMEM_add_to_physmap:
         unlock_pages(arg, sizeof(struct xen_add_to_physmap));
-        break;
-    case XENMEM_remove_from_physmap:
-        unlock_pages(arg, sizeof(struct xen_remove_from_physmap));
         break;
     case XENMEM_current_reservation:
     case XENMEM_maximum_reservation:
diff -r 2737293c761e -r ee62aaafff46 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Wed Jan 14 11:15:01 2009 +0000
+++ b/xen/arch/ia64/xen/mm.c    Wed Jan 14 11:24:37 2009 +0000
@@ -3380,34 +3380,6 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
         break;
     }
 
-    case XENMEM_remove_from_physmap:
-    {
-        struct xen_remove_from_physmap xrfp;
-        unsigned long mfn;
-        struct domain *d;
-
-        if ( copy_from_guest(&xrfp, arg, 1) )
-            return -EFAULT;
-
-        rc = rcu_lock_target_domain_by_id(xrfp.domid, &d);
-        if ( rc != 0 )
-            return rc;
-
-        domain_lock(d);
-
-        mfn = gmfn_to_mfn(d, xrfp.gpfn);
-
-        if ( mfn_valid(mfn) )
-            guest_physmap_remove_page(d, xrfp.gpfn, mfn, 0);
-
-        domain_unlock(d);
-
-        rcu_unlock_domain(d);
-
-        break;
-    }
-
-
     case XENMEM_machine_memory_map:
     {
         struct xen_memory_map memmap;
diff -r 2737293c761e -r ee62aaafff46 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Jan 14 11:15:01 2009 +0000
+++ b/xen/arch/x86/mm.c Wed Jan 14 11:24:37 2009 +0000
@@ -3860,39 +3860,6 @@ long arch_memory_op(int op, XEN_GUEST_HA
         break;
     }
 
-    case XENMEM_remove_from_physmap:
-    {
-        struct xen_remove_from_physmap xrfp;
-        unsigned long mfn;
-        struct domain *d;
-
-        if ( copy_from_guest(&xrfp, arg, 1) )
-            return -EFAULT;
-
-        rc = rcu_lock_target_domain_by_id(xrfp.domid, &d);
-        if ( rc != 0 )
-            return rc;
-
-        if ( xsm_remove_from_physmap(current->domain, d) )
-        {
-            rcu_unlock_domain(d);
-            return -EPERM;
-        }
-
-        domain_lock(d);
-
-        mfn = gmfn_to_mfn(d, xrfp.gpfn);
-
-        if ( mfn_valid(mfn) )
-            guest_physmap_remove_page(d, xrfp.gpfn, mfn, 0);
-
-        domain_unlock(d);
-
-        rcu_unlock_domain(d);
-
-        break;
-    }
-
     case XENMEM_set_memory_map:
     {
         struct xen_foreign_memory_map fmap;
diff -r 2737293c761e -r ee62aaafff46 xen/arch/x86/x86_64/compat/mm.c
--- a/xen/arch/x86/x86_64/compat/mm.c   Wed Jan 14 11:15:01 2009 +0000
+++ b/xen/arch/x86/x86_64/compat/mm.c   Wed Jan 14 11:24:37 2009 +0000
@@ -64,20 +64,6 @@ int compat_arch_memory_op(int op, XEN_GU
             return -EFAULT;
 
         XLAT_add_to_physmap(nat, &cmp);
-        rc = arch_memory_op(op, guest_handle_from_ptr(nat, void));
-
-        break;
-    }
-
-    case XENMEM_remove_from_physmap:
-    {
-        struct compat_remove_from_physmap cmp;
-        struct xen_remove_from_physmap *nat = (void 
*)COMPAT_ARG_XLAT_VIRT_BASE;
-
-        if ( copy_from_guest(&cmp, arg, 1) )
-            return -EFAULT;
-
-        XLAT_remove_from_physmap(nat, &cmp);
         rc = arch_memory_op(op, guest_handle_from_ptr(nat, void));
 
         break;
diff -r 2737293c761e -r ee62aaafff46 xen/include/public/memory.h
--- a/xen/include/public/memory.h       Wed Jan 14 11:15:01 2009 +0000
+++ b/xen/include/public/memory.h       Wed Jan 14 11:24:37 2009 +0000
@@ -219,22 +219,6 @@ typedef struct xen_add_to_physmap xen_ad
 typedef struct xen_add_to_physmap xen_add_to_physmap_t;
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
 
-/*
- * Unmaps the page appearing at a particular GPFN from the specified guest's
- * pseudophysical address space.
- * arg == addr of xen_remove_from_physmap_t.
- */
-#define XENMEM_remove_from_physmap      15
-struct xen_remove_from_physmap {
-    /* Which domain to change the mapping for. */
-    domid_t domid;
-
-    /* GPFN of the current mapping of the page. */
-    xen_pfn_t     gpfn;
-};
-typedef struct xen_remove_from_physmap xen_remove_from_physmap_t;
-DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t);
-
 /*** REMOVED ***/
 /*#define XENMEM_translate_gpfn_list  8*/
 
diff -r 2737293c761e -r ee62aaafff46 xen/include/xlat.lst
--- a/xen/include/xlat.lst      Wed Jan 14 11:15:01 2009 +0000
+++ b/xen/include/xlat.lst      Wed Jan 14 11:24:37 2009 +0000
@@ -33,7 +33,6 @@
 !      kexec_image                     kexec.h
 !      kexec_range                     kexec.h
 !      add_to_physmap                  memory.h
-!      remove_from_physmap             memory.h
 !      foreign_memory_map              memory.h
 !      memory_exchange                 memory.h
 !      memory_map                      memory.h
diff -r 2737293c761e -r ee62aaafff46 xen/include/xsm/xsm.h
--- a/xen/include/xsm/xsm.h     Wed Jan 14 11:15:01 2009 +0000
+++ b/xen/include/xsm/xsm.h     Wed Jan 14 11:24:37 2009 +0000
@@ -142,7 +142,6 @@ struct xsm_operations {
     int (*update_va_mapping) (struct domain *d, struct domain *f, 
                                                             l1_pgentry_t pte);
     int (*add_to_physmap) (struct domain *d1, struct domain *d2);
-    int (*remove_from_physmap) (struct domain *d1, struct domain *d2);
     int (*sendtrigger) (struct domain *d);
     int (*test_assign_device) (uint32_t machine_bdf);
     int (*assign_device) (struct domain *d, uint32_t machine_bdf);
@@ -578,11 +577,6 @@ static inline int xsm_add_to_physmap(str
     return xsm_call(add_to_physmap(d1, d2));
 }
 
-static inline int xsm_remove_from_physmap(struct domain *d1, struct domain *d2)
-{
-    return xsm_call(remove_from_physmap(d1, d2));
-}
-
 static inline int xsm_sendtrigger(struct domain *d)
 {
     return xsm_call(sendtrigger(d));
diff -r 2737293c761e -r ee62aaafff46 xen/xsm/dummy.c
--- a/xen/xsm/dummy.c   Wed Jan 14 11:15:01 2009 +0000
+++ b/xen/xsm/dummy.c   Wed Jan 14 11:24:37 2009 +0000
@@ -452,10 +452,6 @@ static int dummy_ext_vcpucontext (struct
     return 0;
 }
 
-static int dummy_remove_from_physmap (struct domain *d1, struct domain *d2)
-{
-    return 0;
-}
 #endif
 
 struct xsm_operations dummy_xsm_ops;
@@ -562,7 +558,6 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, mmu_machphys_update);
     set_to_dummy_if_null(ops, update_va_mapping);
     set_to_dummy_if_null(ops, add_to_physmap);
-    set_to_dummy_if_null(ops, remove_from_physmap);
     set_to_dummy_if_null(ops, sendtrigger);
     set_to_dummy_if_null(ops, test_assign_device);
     set_to_dummy_if_null(ops, assign_device);
diff -r 2737293c761e -r ee62aaafff46 xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Wed Jan 14 11:15:01 2009 +0000
+++ b/xen/xsm/flask/hooks.c     Wed Jan 14 11:24:37 2009 +0000
@@ -1053,11 +1053,6 @@ static int flask_update_va_mapping(struc
 }
 
 static int flask_add_to_physmap(struct domain *d1, struct domain *d2)
-{
-    return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__PHYSMAP);
-}
-
-static int flask_remove_from_physmap(struct domain *d1, struct domain *d2)
 {
     return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__PHYSMAP);
 }
@@ -1310,7 +1305,6 @@ static struct xsm_operations flask_ops =
     .mmu_machphys_update = flask_mmu_machphys_update,
     .update_va_mapping = flask_update_va_mapping,
     .add_to_physmap = flask_add_to_physmap,
-    .remove_from_physmap = flask_remove_from_physmap,
     .sendtrigger = flask_sendtrigger,
     .test_assign_device = flask_test_assign_device,
     .assign_device = flask_assign_device,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.