debuggers.hg

changeset 20887:fbe8f32fa257

libxc: New hcall_buf_{prep,release} pre-mlock interface

Allow certain performance-critical hypercall wrappers to register data
buffers via a new interface which allows them to be 'bounced' into a
pre-mlock'ed page-sized per-thread data area. This saves the cost of
mlock/munlock on every such hypercall, which can be very expensive on
modern kernels.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jan 22 10:59:03 2010 +0000 (2010-01-22)
parents c06732ac2392
children 9c6ba538ce75
files tools/libxc/xc_domain_restore.c tools/libxc/xc_domain_save.c tools/libxc/xc_misc.c tools/libxc/xc_physdev.c tools/libxc/xc_private.c tools/libxc/xc_private.h tools/libxc/xg_private.c tools/libxc/xg_private.h
line diff
     1.1 --- a/tools/libxc/xc_domain_restore.c	Thu Jan 21 15:13:00 2010 +0000
     1.2 +++ b/tools/libxc/xc_domain_restore.c	Fri Jan 22 10:59:03 2010 +0000
     1.3 @@ -1424,7 +1424,7 @@ int xc_domain_restore(int xc_handle, int
     1.4      ctx->p2m   = calloc(dinfo->p2m_size, sizeof(xen_pfn_t));
     1.5      pfn_type   = calloc(dinfo->p2m_size, sizeof(unsigned long));
     1.6  
     1.7 -    region_mfn = xg_memalign(PAGE_SIZE, ROUNDUP(
     1.8 +    region_mfn = xc_memalign(PAGE_SIZE, ROUNDUP(
     1.9                                MAX_BATCH_SIZE * sizeof(xen_pfn_t), PAGE_SHIFT));
    1.10  
    1.11      if ( (ctx->p2m == NULL) || (pfn_type == NULL) ||
     2.1 --- a/tools/libxc/xc_domain_save.c	Thu Jan 21 15:13:00 2010 +0000
     2.2 +++ b/tools/libxc/xc_domain_save.c	Fri Jan 22 10:59:03 2010 +0000
     2.3 @@ -1012,9 +1012,9 @@ int xc_domain_save(int xc_handle, int io
     2.4      sent_last_iter = dinfo->p2m_size;
     2.5  
     2.6      /* Setup to_send / to_fix and to_skip bitmaps */
     2.7 -    to_send = xg_memalign(PAGE_SIZE, ROUNDUP(BITMAP_SIZE, PAGE_SHIFT)); 
     2.8 +    to_send = xc_memalign(PAGE_SIZE, ROUNDUP(BITMAP_SIZE, PAGE_SHIFT)); 
     2.9      to_fix  = calloc(1, BITMAP_SIZE);
    2.10 -    to_skip = xg_memalign(PAGE_SIZE, ROUNDUP(BITMAP_SIZE, PAGE_SHIFT)); 
    2.11 +    to_skip = xc_memalign(PAGE_SIZE, ROUNDUP(BITMAP_SIZE, PAGE_SHIFT)); 
    2.12  
    2.13      if ( !to_send || !to_fix || !to_skip )
    2.14      {
    2.15 @@ -1056,7 +1056,7 @@ int xc_domain_save(int xc_handle, int io
    2.16  
    2.17      analysis_phase(xc_handle, dom, ctx, to_skip, 0);
    2.18  
    2.19 -    pfn_type   = xg_memalign(PAGE_SIZE, ROUNDUP(
    2.20 +    pfn_type   = xc_memalign(PAGE_SIZE, ROUNDUP(
    2.21                                MAX_BATCH_SIZE * sizeof(*pfn_type), PAGE_SHIFT));
    2.22      pfn_batch  = calloc(MAX_BATCH_SIZE, sizeof(*pfn_batch));
    2.23      if ( (pfn_type == NULL) || (pfn_batch == NULL) )
     3.1 --- a/tools/libxc/xc_misc.c	Thu Jan 21 15:13:00 2010 +0000
     3.2 +++ b/tools/libxc/xc_misc.c	Fri Jan 22 10:59:03 2010 +0000
     3.3 @@ -175,29 +175,29 @@ int xc_hvm_set_pci_intx_level(
     3.4      unsigned int level)
     3.5  {
     3.6      DECLARE_HYPERCALL;
     3.7 -    struct xen_hvm_set_pci_intx_level arg;
     3.8 +    struct xen_hvm_set_pci_intx_level _arg, *arg = &_arg;
     3.9      int rc;
    3.10  
    3.11 -    hypercall.op     = __HYPERVISOR_hvm_op;
    3.12 -    hypercall.arg[0] = HVMOP_set_pci_intx_level;
    3.13 -    hypercall.arg[1] = (unsigned long)&arg;
    3.14 -
    3.15 -    arg.domid  = dom;
    3.16 -    arg.domain = domain;
    3.17 -    arg.bus    = bus;
    3.18 -    arg.device = device;
    3.19 -    arg.intx   = intx;
    3.20 -    arg.level  = level;
    3.21 -
    3.22 -    if ( (rc = lock_pages(&arg, sizeof(arg))) != 0 )
    3.23 +    if ( (rc = hcall_buf_prep((void **)&arg, sizeof(*arg))) != 0 )
    3.24      {
    3.25          PERROR("Could not lock memory");
    3.26          return rc;
    3.27      }
    3.28  
    3.29 +    hypercall.op     = __HYPERVISOR_hvm_op;
    3.30 +    hypercall.arg[0] = HVMOP_set_pci_intx_level;
    3.31 +    hypercall.arg[1] = (unsigned long)arg;
    3.32 +
    3.33 +    arg->domid  = dom;
    3.34 +    arg->domain = domain;
    3.35 +    arg->bus    = bus;
    3.36 +    arg->device = device;
    3.37 +    arg->intx   = intx;
    3.38 +    arg->level  = level;
    3.39 +
    3.40      rc = do_xen_hypercall(xc_handle, &hypercall);
    3.41  
    3.42 -    unlock_pages(&arg, sizeof(arg));
    3.43 +    hcall_buf_release((void **)&arg, sizeof(*arg));
    3.44  
    3.45      return rc;
    3.46  }
    3.47 @@ -208,26 +208,26 @@ int xc_hvm_set_isa_irq_level(
    3.48      unsigned int level)
    3.49  {
    3.50      DECLARE_HYPERCALL;
    3.51 -    struct xen_hvm_set_isa_irq_level arg;
    3.52 +    struct xen_hvm_set_isa_irq_level _arg, *arg = &_arg;
    3.53      int rc;
    3.54  
    3.55 -    hypercall.op     = __HYPERVISOR_hvm_op;
    3.56 -    hypercall.arg[0] = HVMOP_set_isa_irq_level;
    3.57 -    hypercall.arg[1] = (unsigned long)&arg;
    3.58 -
    3.59 -    arg.domid   = dom;
    3.60 -    arg.isa_irq = isa_irq;
    3.61 -    arg.level   = level;
    3.62 -
    3.63 -    if ( (rc = lock_pages(&arg, sizeof(arg))) != 0 )
    3.64 +    if ( (rc = hcall_buf_prep((void **)&arg, sizeof(*arg))) != 0 )
    3.65      {
    3.66          PERROR("Could not lock memory");
    3.67          return rc;
    3.68      }
    3.69  
    3.70 +    hypercall.op     = __HYPERVISOR_hvm_op;
    3.71 +    hypercall.arg[0] = HVMOP_set_isa_irq_level;
    3.72 +    hypercall.arg[1] = (unsigned long)arg;
    3.73 +
    3.74 +    arg->domid   = dom;
    3.75 +    arg->isa_irq = isa_irq;
    3.76 +    arg->level   = level;
    3.77 +
    3.78      rc = do_xen_hypercall(xc_handle, &hypercall);
    3.79  
    3.80 -    unlock_pages(&arg, sizeof(arg));
    3.81 +    hcall_buf_release((void **)&arg, sizeof(*arg));
    3.82  
    3.83      return rc;
    3.84  }
     4.1 --- a/tools/libxc/xc_physdev.c	Thu Jan 21 15:13:00 2010 +0000
     4.2 +++ b/tools/libxc/xc_physdev.c	Fri Jan 22 10:59:03 2010 +0000
     4.3 @@ -36,7 +36,7 @@ int xc_physdev_map_pirq(int xc_handle,
     4.4      map.index = index;
     4.5      map.pirq = *pirq;
     4.6  
     4.7 -    rc = do_physdev_op(xc_handle, PHYSDEVOP_map_pirq, &map);
     4.8 +    rc = do_physdev_op(xc_handle, PHYSDEVOP_map_pirq, &map, sizeof(map));
     4.9  
    4.10      if ( !rc )
    4.11          *pirq = map.pirq;
    4.12 @@ -68,7 +68,7 @@ int xc_physdev_map_pirq_msi(int xc_handl
    4.13      map.entry_nr = entry_nr;
    4.14      map.table_base = table_base;
    4.15  
    4.16 -    rc = do_physdev_op(xc_handle, PHYSDEVOP_map_pirq, &map);
    4.17 +    rc = do_physdev_op(xc_handle, PHYSDEVOP_map_pirq, &map, sizeof(map));
    4.18  
    4.19      if ( !rc )
    4.20          *pirq = map.pirq;
    4.21 @@ -86,7 +86,7 @@ int xc_physdev_unmap_pirq(int xc_handle,
    4.22      unmap.domid = domid;
    4.23      unmap.pirq = pirq;
    4.24  
    4.25 -    rc = do_physdev_op(xc_handle, PHYSDEVOP_unmap_pirq, &unmap);
    4.26 +    rc = do_physdev_op(xc_handle, PHYSDEVOP_unmap_pirq, &unmap, sizeof(unmap));
    4.27  
    4.28      return rc;
    4.29  }
     5.1 --- a/tools/libxc/xc_private.c	Thu Jan 21 15:13:00 2010 +0000
     5.2 +++ b/tools/libxc/xc_private.c	Fri Jan 22 10:59:03 2010 +0000
     5.3 @@ -8,6 +8,9 @@
     5.4  #include "xc_private.h"
     5.5  #include "xg_private.h"
     5.6  #include <stdarg.h>
     5.7 +#include <stdlib.h>
     5.8 +#include <malloc.h>
     5.9 +#include <unistd.h>
    5.10  #include <pthread.h>
    5.11  
    5.12  static pthread_key_t last_error_pkey;
    5.13 @@ -126,27 +129,119 @@ void xc_set_error(int code, const char *
    5.14      }
    5.15  }
    5.16  
    5.17 +#ifdef __sun__
    5.18 +
    5.19 +int lock_pages(void *addr, size_t len) { return 0; }
    5.20 +void unlock_pages(void *addr, size_t len) { }
    5.21 +
    5.22 +int hcall_buf_prep(void **addr, size_t len) { return 0; }
    5.23 +void hcall_buf_release(void **addr, size_t len) { }
    5.24 +
    5.25 +#else /* !__sun__ */
    5.26 +
    5.27  int lock_pages(void *addr, size_t len)
    5.28  {
    5.29 -      int e = 0;
    5.30 -#ifndef __sun__
    5.31 +      int e;
    5.32        void *laddr = (void *)((unsigned long)addr & PAGE_MASK);
    5.33        size_t llen = (len + ((unsigned long)addr - (unsigned long)laddr) +
    5.34                       PAGE_SIZE - 1) & PAGE_MASK;
    5.35        e = mlock(laddr, llen);
    5.36 -#endif
    5.37        return e;
    5.38  }
    5.39  
    5.40  void unlock_pages(void *addr, size_t len)
    5.41  {
    5.42 -#ifndef __sun__
    5.43      void *laddr = (void *)((unsigned long)addr & PAGE_MASK);
    5.44      size_t llen = (len + ((unsigned long)addr - (unsigned long)laddr) +
    5.45                     PAGE_SIZE - 1) & PAGE_MASK;
    5.46      safe_munlock(laddr, llen);
    5.47 +}
    5.48 +
    5.49 +static pthread_key_t hcall_buf_pkey;
    5.50 +static pthread_once_t hcall_buf_pkey_once = PTHREAD_ONCE_INIT;
    5.51 +struct hcall_buf {
    5.52 +    void *buf;
    5.53 +    void *oldbuf;
    5.54 +};
    5.55 +
    5.56 +static void _xc_clean_hcall_buf(void *m)
    5.57 +{
    5.58 +    struct hcall_buf *hcall_buf = m;
    5.59 +
    5.60 +    if ( hcall_buf )
    5.61 +    {
    5.62 +        if ( hcall_buf->buf )
    5.63 +        {
    5.64 +            unlock_pages(hcall_buf->buf, PAGE_SIZE);
    5.65 +            free(hcall_buf->buf);
    5.66 +        }
    5.67 +
    5.68 +        free(hcall_buf);
    5.69 +    }
    5.70 +
    5.71 +    pthread_setspecific(hcall_buf_pkey, NULL);
    5.72 +}
    5.73 +
    5.74 +static void _xc_init_hcall_buf(void)
    5.75 +{
    5.76 +    pthread_key_create(&hcall_buf_pkey, _xc_clean_hcall_buf);
    5.77 +}
    5.78 +
    5.79 +int hcall_buf_prep(void **addr, size_t len)
    5.80 +{
    5.81 +    struct hcall_buf *hcall_buf;
    5.82 +
    5.83 +    pthread_once(&hcall_buf_pkey_once, _xc_init_hcall_buf);
    5.84 +
    5.85 +    hcall_buf = pthread_getspecific(hcall_buf_pkey);
    5.86 +    if ( !hcall_buf )
    5.87 +    {
    5.88 +        hcall_buf = calloc(1, sizeof(*hcall_buf));
    5.89 +        if ( !hcall_buf )
    5.90 +            goto out;
    5.91 +        pthread_setspecific(hcall_buf_pkey, hcall_buf);
    5.92 +    }
    5.93 +
    5.94 +    if ( !hcall_buf->buf )
    5.95 +    {
    5.96 +        hcall_buf->buf = xc_memalign(PAGE_SIZE, PAGE_SIZE);
    5.97 +        if ( !hcall_buf->buf || lock_pages(hcall_buf->buf, PAGE_SIZE) )
    5.98 +        {
    5.99 +            free(hcall_buf->buf);
   5.100 +            hcall_buf->buf = NULL;
   5.101 +            goto out;
   5.102 +        }
   5.103 +    }
   5.104 +
   5.105 +    if ( (len < PAGE_SIZE) && !hcall_buf->oldbuf )
   5.106 +    {
   5.107 +        memcpy(hcall_buf->buf, *addr, len);
   5.108 +        hcall_buf->oldbuf = *addr;
   5.109 +        *addr = hcall_buf->buf;
   5.110 +        return 0;
   5.111 +    }
   5.112 +
   5.113 + out:
   5.114 +    return lock_pages(*addr, len);
   5.115 +}
   5.116 +
   5.117 +void hcall_buf_release(void **addr, size_t len)
   5.118 +{
   5.119 +    struct hcall_buf *hcall_buf = pthread_getspecific(hcall_buf_pkey);
   5.120 +
   5.121 +    if ( hcall_buf && (hcall_buf->buf == *addr) )
   5.122 +    {
   5.123 +        memcpy(hcall_buf->oldbuf, *addr, len);
   5.124 +        *addr = hcall_buf->oldbuf;
   5.125 +        hcall_buf->oldbuf = NULL;
   5.126 +    }
   5.127 +    else
   5.128 +    {
   5.129 +        unlock_pages(*addr, len);
   5.130 +    }
   5.131 +}
   5.132 +
   5.133  #endif
   5.134 -}
   5.135  
   5.136  /* NB: arr must be locked */
   5.137  int xc_get_pfn_type_batch(int xc_handle, uint32_t dom,
   5.138 @@ -169,21 +264,21 @@ int xc_mmuext_op(
   5.139      DECLARE_HYPERCALL;
   5.140      long ret = -EINVAL;
   5.141  
   5.142 +    if ( hcall_buf_prep((void **)&op, nr_ops*sizeof(*op)) != 0 )
   5.143 +    {
   5.144 +        PERROR("Could not lock memory for Xen hypercall");
   5.145 +        goto out1;
   5.146 +    }
   5.147 +
   5.148      hypercall.op     = __HYPERVISOR_mmuext_op;
   5.149      hypercall.arg[0] = (unsigned long)op;
   5.150      hypercall.arg[1] = (unsigned long)nr_ops;
   5.151      hypercall.arg[2] = (unsigned long)0;
   5.152      hypercall.arg[3] = (unsigned long)dom;
   5.153  
   5.154 -    if ( lock_pages(op, nr_ops*sizeof(*op)) != 0 )
   5.155 -    {
   5.156 -        PERROR("Could not lock memory for Xen hypercall");
   5.157 -        goto out1;
   5.158 -    }
   5.159 -
   5.160      ret = do_xen_hypercall(xc_handle, &hypercall);
   5.161  
   5.162 -    unlock_pages(op, nr_ops*sizeof(*op));
   5.163 +    hcall_buf_release((void **)&op, nr_ops*sizeof(*op));
   5.164  
   5.165   out1:
   5.166      return ret;
   5.167 @@ -656,6 +751,22 @@ int xc_ffs64(uint64_t x)
   5.168      return l ? xc_ffs32(l) : h ? xc_ffs32(h) + 32 : 0;
   5.169  }
   5.170  
   5.171 +void *xc_memalign(size_t alignment, size_t size)
   5.172 +{
   5.173 +#if defined(_POSIX_C_SOURCE) && !defined(__sun__)
   5.174 +    int ret;
   5.175 +    void *ptr;
   5.176 +    ret = posix_memalign(&ptr, alignment, size);
   5.177 +    if (ret != 0)
   5.178 +        return NULL;
   5.179 +    return ptr;
   5.180 +#elif defined(__NetBSD__) || defined(__OpenBSD__)
   5.181 +    return valloc(size);
   5.182 +#else
   5.183 +    return memalign(alignment, size);
   5.184 +#endif
   5.185 +}
   5.186 +
   5.187  /*
   5.188   * Local variables:
   5.189   * mode: C
     6.1 --- a/tools/libxc/xc_private.h	Thu Jan 21 15:13:00 2010 +0000
     6.2 +++ b/tools/libxc/xc_private.h	Fri Jan 22 10:59:03 2010 +0000
     6.3 @@ -78,9 +78,14 @@ void xc_set_error(int code, const char *
     6.4  #define PERROR(_m, _a...) xc_set_error(XC_INTERNAL_ERROR, _m " (%d = %s)", \
     6.5                                         ## _a , errno, safe_strerror(errno))
     6.6  
     6.7 +void *xc_memalign(size_t alignment, size_t size);
     6.8 +
     6.9  int lock_pages(void *addr, size_t len);
    6.10  void unlock_pages(void *addr, size_t len);
    6.11  
    6.12 +int hcall_buf_prep(void **addr, size_t len);
    6.13 +void hcall_buf_release(void **addr, size_t len);
    6.14 +
    6.15  static inline void safe_munlock(const void *addr, size_t len)
    6.16  {
    6.17      int saved_errno = errno;
    6.18 @@ -101,21 +106,22 @@ static inline int do_xen_version(int xc_
    6.19      return do_xen_hypercall(xc_handle, &hypercall);
    6.20  }
    6.21  
    6.22 -static inline int do_physdev_op(int xc_handle, int cmd, void *op)
    6.23 +static inline int do_physdev_op(int xc_handle, int cmd, void *op, size_t len)
    6.24  {
    6.25      int ret = -1;
    6.26  
    6.27      DECLARE_HYPERCALL;
    6.28 -    hypercall.op = __HYPERVISOR_physdev_op;
    6.29 -    hypercall.arg[0] = (unsigned long) cmd;
    6.30 -    hypercall.arg[1] = (unsigned long) op;
    6.31  
    6.32 -    if ( lock_pages(op, sizeof(*op)) != 0 )
    6.33 +    if ( hcall_buf_prep(&op, len) != 0 )
    6.34      {
    6.35          PERROR("Could not lock memory for Xen hypercall");
    6.36          goto out1;
    6.37      }
    6.38  
    6.39 +    hypercall.op = __HYPERVISOR_physdev_op;
    6.40 +    hypercall.arg[0] = (unsigned long) cmd;
    6.41 +    hypercall.arg[1] = (unsigned long) op;
    6.42 +
    6.43      if ( (ret = do_xen_hypercall(xc_handle, &hypercall)) < 0 )
    6.44      {
    6.45          if ( errno == EACCES )
    6.46 @@ -123,7 +129,7 @@ static inline int do_physdev_op(int xc_h
    6.47                      " rebuild the user-space tool set?\n");
    6.48      }
    6.49  
    6.50 -    unlock_pages(op, sizeof(*op));
    6.51 +    hcall_buf_release(&op, len);
    6.52  
    6.53  out1:
    6.54      return ret;
    6.55 @@ -134,17 +140,17 @@ static inline int do_domctl(int xc_handl
    6.56      int ret = -1;
    6.57      DECLARE_HYPERCALL;
    6.58  
    6.59 +    if ( hcall_buf_prep((void **)&domctl, sizeof(*domctl)) != 0 )
    6.60 +    {
    6.61 +        PERROR("Could not lock memory for Xen hypercall");
    6.62 +        goto out1;
    6.63 +    }
    6.64 +
    6.65      domctl->interface_version = XEN_DOMCTL_INTERFACE_VERSION;
    6.66  
    6.67      hypercall.op     = __HYPERVISOR_domctl;
    6.68      hypercall.arg[0] = (unsigned long)domctl;
    6.69  
    6.70 -    if ( lock_pages(domctl, sizeof(*domctl)) != 0 )
    6.71 -    {
    6.72 -        PERROR("Could not lock memory for Xen hypercall");
    6.73 -        goto out1;
    6.74 -    }
    6.75 -
    6.76      if ( (ret = do_xen_hypercall(xc_handle, &hypercall)) < 0 )
    6.77      {
    6.78          if ( errno == EACCES )
    6.79 @@ -152,7 +158,7 @@ static inline int do_domctl(int xc_handl
    6.80                      " rebuild the user-space tool set?\n");
    6.81      }
    6.82  
    6.83 -    unlock_pages(domctl, sizeof(*domctl));
    6.84 +    hcall_buf_release((void **)&domctl, sizeof(*domctl));
    6.85  
    6.86   out1:
    6.87      return ret;
    6.88 @@ -163,17 +169,17 @@ static inline int do_sysctl(int xc_handl
    6.89      int ret = -1;
    6.90      DECLARE_HYPERCALL;
    6.91  
    6.92 +    if ( hcall_buf_prep((void **)&sysctl, sizeof(*sysctl)) != 0 )
    6.93 +    {
    6.94 +        PERROR("Could not lock memory for Xen hypercall");
    6.95 +        goto out1;
    6.96 +    }
    6.97 +
    6.98      sysctl->interface_version = XEN_SYSCTL_INTERFACE_VERSION;
    6.99  
   6.100      hypercall.op     = __HYPERVISOR_sysctl;
   6.101      hypercall.arg[0] = (unsigned long)sysctl;
   6.102  
   6.103 -    if ( lock_pages(sysctl, sizeof(*sysctl)) != 0 )
   6.104 -    {
   6.105 -        PERROR("Could not lock memory for Xen hypercall");
   6.106 -        goto out1;
   6.107 -    }
   6.108 -
   6.109      if ( (ret = do_xen_hypercall(xc_handle, &hypercall)) < 0 )
   6.110      {
   6.111          if ( errno == EACCES )
   6.112 @@ -181,7 +187,7 @@ static inline int do_sysctl(int xc_handl
   6.113                      " rebuild the user-space tool set?\n");
   6.114      }
   6.115  
   6.116 -    unlock_pages(sysctl, sizeof(*sysctl));
   6.117 +    hcall_buf_release((void **)&sysctl, sizeof(*sysctl));
   6.118  
   6.119   out1:
   6.120      return ret;
     7.1 --- a/tools/libxc/xg_private.c	Thu Jan 21 15:13:00 2010 +0000
     7.2 +++ b/tools/libxc/xg_private.c	Fri Jan 22 10:59:03 2010 +0000
     7.3 @@ -183,22 +183,6 @@ unsigned long csum_page(void *page)
     7.4      return -1;
     7.5  }
     7.6  
     7.7 -void *xg_memalign(size_t alignment, size_t size)
     7.8 -{
     7.9 -#if defined(_POSIX_C_SOURCE) && !defined(__sun__)
    7.10 -    int ret;
    7.11 -    void *ptr;
    7.12 -    ret = posix_memalign(&ptr, alignment, size);
    7.13 -    if (ret != 0)
    7.14 -        return NULL;
    7.15 -    return ptr;
    7.16 -#elif defined(__NetBSD__) || defined(__OpenBSD__)
    7.17 -    return valloc(size);
    7.18 -#else
    7.19 -    return memalign(alignment, size);
    7.20 -#endif
    7.21 -}
    7.22 -
    7.23  /*
    7.24   * Local variables:
    7.25   * mode: C
     8.1 --- a/tools/libxc/xg_private.h	Thu Jan 21 15:13:00 2010 +0000
     8.2 +++ b/tools/libxc/xg_private.h	Fri Jan 22 10:59:03 2010 +0000
     8.3 @@ -177,6 +177,4 @@ struct domain_info_context {
     8.4  int pin_table(int xc_handle, unsigned int type, unsigned long mfn,
     8.5                domid_t dom);
     8.6  
     8.7 -void *xg_memalign(size_t alignment, size_t size);
     8.8 -
     8.9  #endif /* XG_PRIVATE_H */