ia64/xen-unstable

changeset 10001:8c0d89f8d0f7

[IA64] xen: remove dom0vp_populate_physmap hypercall

remove populate_physmap hypercall which becomes unncesarry because
XENMEM op is fully supported.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Fri May 12 08:49:40 2006 -0600 (2006-05-12)
parents 4fc1110f09c9
children d86236cb824a
files xen/arch/ia64/xen/dom0_ops.c xen/arch/ia64/xen/domain.c xen/include/asm-ia64/domain.h xen/include/public/arch-ia64.h
line diff
     1.1 --- a/xen/arch/ia64/xen/dom0_ops.c	Fri May 12 08:47:07 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom0_ops.c	Fri May 12 08:49:40 2006 -0600
     1.3 @@ -264,10 +264,6 @@ do_dom0vp_op(unsigned long cmd,
     1.4          }
     1.5          ret = get_gpfn_from_mfn(arg0);
     1.6          break;
     1.7 -    case IA64_DOM0VP_populate_physmap:
     1.8 -        ret = dom0vp_populate_physmap(d, arg0,
     1.9 -                                      (unsigned int)arg1, (unsigned int)arg2);
    1.10 -        break;
    1.11      case IA64_DOM0VP_zap_physmap:
    1.12          ret = dom0vp_zap_physmap(d, arg0, (unsigned int)arg1);
    1.13          break;
     2.1 --- a/xen/arch/ia64/xen/domain.c	Fri May 12 08:47:07 2006 -0600
     2.2 +++ b/xen/arch/ia64/xen/domain.c	Fri May 12 08:49:40 2006 -0600
     2.3 @@ -984,66 +984,6 @@ unsigned long lookup_domain_mpa(struct d
     2.4  #ifdef CONFIG_XEN_IA64_DOM0_VP
     2.5  //XXX SMP
     2.6  unsigned long
     2.7 -dom0vp_populate_physmap(struct domain *d, unsigned long gpfn,
     2.8 -                        unsigned int extent_order, unsigned int address_bits)
     2.9 -{
    2.10 -    unsigned long ret = 0;
    2.11 -    int flags = 0;
    2.12 -    unsigned long mpaddr = gpfn << PAGE_SHIFT;
    2.13 -    unsigned long extent_size = 1UL << extent_order;
    2.14 -    unsigned long offset;
    2.15 -    struct page_info* page;
    2.16 -    unsigned long physaddr;
    2.17 -
    2.18 -    if (extent_order > 0 && !multipage_allocation_permitted(d)) {
    2.19 -        ret = -EINVAL;
    2.20 -        goto out;
    2.21 -    }
    2.22 -
    2.23 -    if (gpfn + (1 << extent_order) < gpfn) {
    2.24 -        ret = -EINVAL;
    2.25 -        goto out;
    2.26 -    }
    2.27 -    if (gpfn > d->max_pages || gpfn + (1 << extent_order) > d->max_pages) {
    2.28 -        ret = -EINVAL;
    2.29 -        goto out;
    2.30 -    }
    2.31 -    if ((extent_size << PAGE_SHIFT) < extent_size) {
    2.32 -        ret = -EINVAL;
    2.33 -        goto out;
    2.34 -    }
    2.35 -
    2.36 -    //XXX check address_bits and set flags = ALLOC_DOM_DMA if needed
    2.37 -
    2.38 -    // check the rage is not populated yet.
    2.39 -    //XXX loop optimization
    2.40 -    for (offset = 0; offset < extent_size << PAGE_SHIFT; offset += PAGE_SIZE) {
    2.41 -        if (____lookup_domain_mpa(d, mpaddr + offset) != INVALID_MFN) {
    2.42 -            ret = -EBUSY;
    2.43 -            goto out;
    2.44 -        }
    2.45 -    }
    2.46 -
    2.47 -    page = alloc_domheap_pages(d, extent_order, flags);
    2.48 -    if (page == NULL) {
    2.49 -        ret = -ENOMEM;
    2.50 -        DPRINTK("Could not allocate order=%d extent: id=%d flags=%x\n",
    2.51 -                extent_order, d->domain_id, flags);
    2.52 -        goto out;
    2.53 -    }
    2.54 -
    2.55 -    //XXX loop optimization
    2.56 -    physaddr = page_to_maddr(page);
    2.57 -    for (offset = 0; offset < extent_size << PAGE_SHIFT; offset += PAGE_SIZE) {
    2.58 -        assign_domain_page(d, mpaddr + offset, physaddr + offset);
    2.59 -    }
    2.60 -
    2.61 -out:
    2.62 -    return ret;
    2.63 -}
    2.64 -
    2.65 -//XXX SMP
    2.66 -unsigned long
    2.67  dom0vp_zap_physmap(struct domain *d, unsigned long gpfn,
    2.68                     unsigned int extent_order)
    2.69  {
     3.1 --- a/xen/include/asm-ia64/domain.h	Fri May 12 08:47:07 2006 -0600
     3.2 +++ b/xen/include/asm-ia64/domain.h	Fri May 12 08:49:40 2006 -0600
     3.3 @@ -126,7 +126,6 @@ void assign_domain_io_page(struct domain
     3.4  unsigned long assign_domain_mmio_page(struct domain *d, unsigned long mpaddr, unsigned long size);
     3.5  unsigned long assign_domain_mach_page(struct domain *d, unsigned long mpaddr, unsigned long size);
     3.6  unsigned long do_dom0vp_op(unsigned long cmd, unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long arg3);
     3.7 -unsigned long dom0vp_populate_physmap(struct domain *d, unsigned long gpfn, unsigned int extent_order, unsigned int address_bits);
     3.8  unsigned long dom0vp_zap_physmap(struct domain *d, unsigned long gpfn, unsigned int extent_order);
     3.9  unsigned long dom0vp_add_physmap(struct domain* d, unsigned long gpfn, unsigned long mfn, unsigned int flags, domid_t domid);
    3.10  #endif
     4.1 --- a/xen/include/public/arch-ia64.h	Fri May 12 08:47:07 2006 -0600
     4.2 +++ b/xen/include/public/arch-ia64.h	Fri May 12 08:49:40 2006 -0600
     4.3 @@ -349,10 +349,6 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_conte
     4.4                                                  // to the corresponding
     4.5                                                  // pseudo physical page frame
     4.6                                                  // number of the caller domain
     4.7 -#define IA64_DOM0VP_populate_physmap    16      // allocate machine-contigusous
     4.8 -                                                // memory region and
     4.9 -                                                // map it to pseudo physical
    4.10 -                                                // address
    4.11  #define IA64_DOM0VP_zap_physmap         17      // unmap and free pages
    4.12                                                  // contained in the specified
    4.13                                                  // pseudo physical region