ia64/xen-unstable

changeset 19042:ee62aaafff46

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@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jan 14 11:24:37 2009 +0000 (2009-01-14)
parents 2737293c761e
children 77476eeb8c42
files tools/libxc/xc_private.c xen/arch/ia64/xen/mm.c xen/arch/x86/mm.c xen/arch/x86/x86_64/compat/mm.c xen/include/public/memory.h xen/include/xlat.lst xen/include/xsm/xsm.h xen/xsm/dummy.c xen/xsm/flask/hooks.c
line diff
     1.1 --- a/tools/libxc/xc_private.c	Wed Jan 14 11:15:01 2009 +0000
     1.2 +++ b/tools/libxc/xc_private.c	Wed Jan 14 11:24:37 2009 +0000
     1.3 @@ -307,13 +307,6 @@ int xc_memory_op(int xc_handle,
     1.4              goto out1;
     1.5          }
     1.6          break;
     1.7 -    case XENMEM_remove_from_physmap:
     1.8 -        if ( lock_pages(arg, sizeof(struct xen_remove_from_physmap)) )
     1.9 -        {
    1.10 -            PERROR("Could not lock");
    1.11 -            goto out1;
    1.12 -        }
    1.13 -        break;
    1.14      case XENMEM_current_reservation:
    1.15      case XENMEM_maximum_reservation:
    1.16      case XENMEM_maximum_gpfn:
    1.17 @@ -355,9 +348,6 @@ int xc_memory_op(int xc_handle,
    1.18      case XENMEM_add_to_physmap:
    1.19          unlock_pages(arg, sizeof(struct xen_add_to_physmap));
    1.20          break;
    1.21 -    case XENMEM_remove_from_physmap:
    1.22 -        unlock_pages(arg, sizeof(struct xen_remove_from_physmap));
    1.23 -        break;
    1.24      case XENMEM_current_reservation:
    1.25      case XENMEM_maximum_reservation:
    1.26      case XENMEM_maximum_gpfn:
     2.1 --- a/xen/arch/ia64/xen/mm.c	Wed Jan 14 11:15:01 2009 +0000
     2.2 +++ b/xen/arch/ia64/xen/mm.c	Wed Jan 14 11:24:37 2009 +0000
     2.3 @@ -3380,34 +3380,6 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
     2.4          break;
     2.5      }
     2.6  
     2.7 -    case XENMEM_remove_from_physmap:
     2.8 -    {
     2.9 -        struct xen_remove_from_physmap xrfp;
    2.10 -        unsigned long mfn;
    2.11 -        struct domain *d;
    2.12 -
    2.13 -        if ( copy_from_guest(&xrfp, arg, 1) )
    2.14 -            return -EFAULT;
    2.15 -
    2.16 -        rc = rcu_lock_target_domain_by_id(xrfp.domid, &d);
    2.17 -        if ( rc != 0 )
    2.18 -            return rc;
    2.19 -
    2.20 -        domain_lock(d);
    2.21 -
    2.22 -        mfn = gmfn_to_mfn(d, xrfp.gpfn);
    2.23 -
    2.24 -        if ( mfn_valid(mfn) )
    2.25 -            guest_physmap_remove_page(d, xrfp.gpfn, mfn, 0);
    2.26 -
    2.27 -        domain_unlock(d);
    2.28 -
    2.29 -        rcu_unlock_domain(d);
    2.30 -
    2.31 -        break;
    2.32 -    }
    2.33 -
    2.34 -
    2.35      case XENMEM_machine_memory_map:
    2.36      {
    2.37          struct xen_memory_map memmap;
     3.1 --- a/xen/arch/x86/mm.c	Wed Jan 14 11:15:01 2009 +0000
     3.2 +++ b/xen/arch/x86/mm.c	Wed Jan 14 11:24:37 2009 +0000
     3.3 @@ -3860,39 +3860,6 @@ long arch_memory_op(int op, XEN_GUEST_HA
     3.4          break;
     3.5      }
     3.6  
     3.7 -    case XENMEM_remove_from_physmap:
     3.8 -    {
     3.9 -        struct xen_remove_from_physmap xrfp;
    3.10 -        unsigned long mfn;
    3.11 -        struct domain *d;
    3.12 -
    3.13 -        if ( copy_from_guest(&xrfp, arg, 1) )
    3.14 -            return -EFAULT;
    3.15 -
    3.16 -        rc = rcu_lock_target_domain_by_id(xrfp.domid, &d);
    3.17 -        if ( rc != 0 )
    3.18 -            return rc;
    3.19 -
    3.20 -        if ( xsm_remove_from_physmap(current->domain, d) )
    3.21 -        {
    3.22 -            rcu_unlock_domain(d);
    3.23 -            return -EPERM;
    3.24 -        }
    3.25 -
    3.26 -        domain_lock(d);
    3.27 -
    3.28 -        mfn = gmfn_to_mfn(d, xrfp.gpfn);
    3.29 -
    3.30 -        if ( mfn_valid(mfn) )
    3.31 -            guest_physmap_remove_page(d, xrfp.gpfn, mfn, 0);
    3.32 -
    3.33 -        domain_unlock(d);
    3.34 -
    3.35 -        rcu_unlock_domain(d);
    3.36 -
    3.37 -        break;
    3.38 -    }
    3.39 -
    3.40      case XENMEM_set_memory_map:
    3.41      {
    3.42          struct xen_foreign_memory_map fmap;
     4.1 --- a/xen/arch/x86/x86_64/compat/mm.c	Wed Jan 14 11:15:01 2009 +0000
     4.2 +++ b/xen/arch/x86/x86_64/compat/mm.c	Wed Jan 14 11:24:37 2009 +0000
     4.3 @@ -69,20 +69,6 @@ int compat_arch_memory_op(int op, XEN_GU
     4.4          break;
     4.5      }
     4.6  
     4.7 -    case XENMEM_remove_from_physmap:
     4.8 -    {
     4.9 -        struct compat_remove_from_physmap cmp;
    4.10 -        struct xen_remove_from_physmap *nat = (void *)COMPAT_ARG_XLAT_VIRT_BASE;
    4.11 -
    4.12 -        if ( copy_from_guest(&cmp, arg, 1) )
    4.13 -            return -EFAULT;
    4.14 -
    4.15 -        XLAT_remove_from_physmap(nat, &cmp);
    4.16 -        rc = arch_memory_op(op, guest_handle_from_ptr(nat, void));
    4.17 -
    4.18 -        break;
    4.19 -    }
    4.20 -
    4.21      case XENMEM_set_memory_map:
    4.22      {
    4.23          struct compat_foreign_memory_map cmp;
     5.1 --- a/xen/include/public/memory.h	Wed Jan 14 11:15:01 2009 +0000
     5.2 +++ b/xen/include/public/memory.h	Wed Jan 14 11:24:37 2009 +0000
     5.3 @@ -219,22 +219,6 @@ struct xen_add_to_physmap {
     5.4  typedef struct xen_add_to_physmap xen_add_to_physmap_t;
     5.5  DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
     5.6  
     5.7 -/*
     5.8 - * Unmaps the page appearing at a particular GPFN from the specified guest's
     5.9 - * pseudophysical address space.
    5.10 - * arg == addr of xen_remove_from_physmap_t.
    5.11 - */
    5.12 -#define XENMEM_remove_from_physmap      15
    5.13 -struct xen_remove_from_physmap {
    5.14 -    /* Which domain to change the mapping for. */
    5.15 -    domid_t domid;
    5.16 -
    5.17 -    /* GPFN of the current mapping of the page. */
    5.18 -    xen_pfn_t     gpfn;
    5.19 -};
    5.20 -typedef struct xen_remove_from_physmap xen_remove_from_physmap_t;
    5.21 -DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t);
    5.22 -
    5.23  /*** REMOVED ***/
    5.24  /*#define XENMEM_translate_gpfn_list  8*/
    5.25  
     6.1 --- a/xen/include/xlat.lst	Wed Jan 14 11:15:01 2009 +0000
     6.2 +++ b/xen/include/xlat.lst	Wed Jan 14 11:24:37 2009 +0000
     6.3 @@ -33,7 +33,6 @@
     6.4  !	kexec_image			kexec.h
     6.5  !	kexec_range			kexec.h
     6.6  !	add_to_physmap			memory.h
     6.7 -!	remove_from_physmap		memory.h
     6.8  !	foreign_memory_map		memory.h
     6.9  !	memory_exchange			memory.h
    6.10  !	memory_map			memory.h
     7.1 --- a/xen/include/xsm/xsm.h	Wed Jan 14 11:15:01 2009 +0000
     7.2 +++ b/xen/include/xsm/xsm.h	Wed Jan 14 11:24:37 2009 +0000
     7.3 @@ -142,7 +142,6 @@ struct xsm_operations {
     7.4      int (*update_va_mapping) (struct domain *d, struct domain *f, 
     7.5                                                              l1_pgentry_t pte);
     7.6      int (*add_to_physmap) (struct domain *d1, struct domain *d2);
     7.7 -    int (*remove_from_physmap) (struct domain *d1, struct domain *d2);
     7.8      int (*sendtrigger) (struct domain *d);
     7.9      int (*test_assign_device) (uint32_t machine_bdf);
    7.10      int (*assign_device) (struct domain *d, uint32_t machine_bdf);
    7.11 @@ -578,11 +577,6 @@ static inline int xsm_add_to_physmap(str
    7.12      return xsm_call(add_to_physmap(d1, d2));
    7.13  }
    7.14  
    7.15 -static inline int xsm_remove_from_physmap(struct domain *d1, struct domain *d2)
    7.16 -{
    7.17 -    return xsm_call(remove_from_physmap(d1, d2));
    7.18 -}
    7.19 -
    7.20  static inline int xsm_sendtrigger(struct domain *d)
    7.21  {
    7.22      return xsm_call(sendtrigger(d));
     8.1 --- a/xen/xsm/dummy.c	Wed Jan 14 11:15:01 2009 +0000
     8.2 +++ b/xen/xsm/dummy.c	Wed Jan 14 11:24:37 2009 +0000
     8.3 @@ -452,10 +452,6 @@ static int dummy_ext_vcpucontext (struct
     8.4      return 0;
     8.5  }
     8.6  
     8.7 -static int dummy_remove_from_physmap (struct domain *d1, struct domain *d2)
     8.8 -{
     8.9 -    return 0;
    8.10 -}
    8.11  #endif
    8.12  
    8.13  struct xsm_operations dummy_xsm_ops;
    8.14 @@ -562,7 +558,6 @@ void xsm_fixup_ops (struct xsm_operation
    8.15      set_to_dummy_if_null(ops, mmu_machphys_update);
    8.16      set_to_dummy_if_null(ops, update_va_mapping);
    8.17      set_to_dummy_if_null(ops, add_to_physmap);
    8.18 -    set_to_dummy_if_null(ops, remove_from_physmap);
    8.19      set_to_dummy_if_null(ops, sendtrigger);
    8.20      set_to_dummy_if_null(ops, test_assign_device);
    8.21      set_to_dummy_if_null(ops, assign_device);
     9.1 --- a/xen/xsm/flask/hooks.c	Wed Jan 14 11:15:01 2009 +0000
     9.2 +++ b/xen/xsm/flask/hooks.c	Wed Jan 14 11:24:37 2009 +0000
     9.3 @@ -1057,11 +1057,6 @@ static int flask_add_to_physmap(struct d
     9.4      return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__PHYSMAP);
     9.5  }
     9.6  
     9.7 -static int flask_remove_from_physmap(struct domain *d1, struct domain *d2)
     9.8 -{
     9.9 -    return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__PHYSMAP);
    9.10 -}
    9.11 -
    9.12  static int flask_sendtrigger(struct domain *d)
    9.13  {
    9.14      return domain_has_perm(current->domain, d, SECCLASS_DOMAIN, DOMAIN__TRIGGER);
    9.15 @@ -1310,7 +1305,6 @@ static struct xsm_operations flask_ops =
    9.16      .mmu_machphys_update = flask_mmu_machphys_update,
    9.17      .update_va_mapping = flask_update_va_mapping,
    9.18      .add_to_physmap = flask_add_to_physmap,
    9.19 -    .remove_from_physmap = flask_remove_from_physmap,
    9.20      .sendtrigger = flask_sendtrigger,
    9.21      .test_assign_device = flask_test_assign_device,
    9.22      .assign_device = flask_assign_device,