libxc: use generic xc_get_pfn_list on ia64
authorIan Campbell <ian.campbell@citrix.com>
Mon, 18 Oct 2010 16:40:08 +0000 (17:40 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 18 Oct 2010 16:40:08 +0000 (17:40 +0100)
The ia64 specific xc_get_pfn_list doesn't seem any different to the
generic xc_get_pfn_list once the call to xc_ia64_get_pfn_list is
expanded so remove and just use the generic one.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/ia64/xc_ia64_stubs.c
tools/libxc/xc_private.c

index 7f63727e0ab435616aafc5fec4f1384049f5f794..d7dd89b467a3bc15da94a78ebd8bca86988bac00 100644 (file)
@@ -34,37 +34,6 @@ xc_ia64_fpsr_default(void)
     return FPSR_DEFAULT;
 }
 
-static int
-xc_ia64_get_pfn_list(xc_interface *xch, uint32_t domid, xen_pfn_t *pfn_buf,
-                     unsigned int start_page, unsigned int nr_pages)
-{
-    DECLARE_DOMCTL;
-    int ret;
-
-    domctl.cmd = XEN_DOMCTL_getmemlist;
-    domctl.domain = (domid_t)domid;
-    domctl.u.getmemlist.max_pfns = nr_pages;
-    domctl.u.getmemlist.start_pfn = start_page;
-    domctl.u.getmemlist.num_pfns = 0;
-    set_xen_guest_handle(domctl.u.getmemlist.buffer, pfn_buf);
-
-    if (lock_pages(pfn_buf, nr_pages * sizeof(xen_pfn_t)) != 0) {
-        PERROR("Could not lock pfn list buffer");
-        return -1;
-    }
-    ret = do_domctl(xch, &domctl);
-    unlock_pages(pfn_buf, nr_pages * sizeof(xen_pfn_t));
-
-    return ret < 0 ? -1 : nr_pages;
-}
-
-int
-xc_get_pfn_list(xc_interface *xch, uint32_t domid, uint64_t *pfn_buf,
-                unsigned long max_pfns)
-{
-    return xc_ia64_get_pfn_list(xch, domid, (xen_pfn_t *)pfn_buf,
-                                0, max_pfns);
-}
 
 /* It is possible to get memmap_info and memmap by
    foreign domain page mapping. But it's racy. Use hypercall to avoid race. */
index f2ff93ad2658ba5e534a10f862f2b1d107d849ea..1c09908ee74488adc2954e34c01b90b49be3ae44 100644 (file)
@@ -492,7 +492,6 @@ int xc_machphys_mfn_list(xc_interface *xch,
     return rc;
 }
 
-#ifndef __ia64__
 int xc_get_pfn_list(xc_interface *xch,
                     uint32_t domid,
                     uint64_t *pfn_buf,
@@ -521,7 +520,6 @@ int xc_get_pfn_list(xc_interface *xch,
 
     return (ret < 0) ? -1 : domctl.u.getmemlist.num_pfns;
 }
-#endif
 
 long xc_get_tot_pages(xc_interface *xch, uint32_t domid)
 {