ia64/xen-unstable

changeset 4692:c9edf0896f07

bitkeeper revision 1.1389.2.1 (42714bdc95kBU21y23J3Wciri--8Yw)

Merge xen-2.0-testing "sync w/ unstable" changes.
author cl349@firebug.cl.cam.ac.uk
date Thu Apr 28 20:47:24 2005 +0000 (2005-04-28)
parents b2ca9de6952a 0f620bc56828
children 2f776687450f
files .rootkeys linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6.11-xen-sparse/arch/xen/i386/pci/direct.c linux-2.6.11-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6.11-xen-sparse/arch/xen/kernel/Makefile linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/desc.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/tlbflush.h linux-2.6.11-xen-sparse/include/asm-xen/evtchn.h linux-2.6.11-xen-sparse/include/asm-xen/gnttab.h linux-2.6.11-xen-sparse/include/asm-xen/hypervisor.h
line diff
     1.1 --- a/.rootkeys	Thu Apr 28 15:12:37 2005 +0000
     1.2 +++ b/.rootkeys	Thu Apr 28 20:47:24 2005 +0000
     1.3 @@ -259,7 +259,6 @@ 40f56239bvOjuuuViZ0XMlNiREFC0A linux-2.6
     1.4  41ab6fa06JdF7jxUsuDcjN3UhuIAxg linux-2.6.11-xen-sparse/arch/xen/kernel/devmem.c
     1.5  40f56238xFQe9T7M_U_FItM-bZIpLw linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c
     1.6  4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c
     1.7 -412dfae9eA3_6e6bCGUtg1mj8b56fQ linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c
     1.8  40f562392LBhwmOxVPsYdkYXMxI_ZQ linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c
     1.9  414c113396tK1HTVeUalm3u-1DF16g linux-2.6.11-xen-sparse/arch/xen/kernel/skbuff.c
    1.10  418f90e4lGdeJK9rmbOB1kN-IKSjsQ linux-2.6.11-xen-sparse/arch/xen/kernel/smp.c
    1.11 @@ -407,7 +406,6 @@ 41af4017PDMuSmMWtSRU5UC9Vylw5g linux-2.6
    1.12  40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.11-xen-sparse/include/asm-xen/ctrl_if.h
    1.13  40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.11-xen-sparse/include/asm-xen/evtchn.h
    1.14  419b4e9367PjTEvdjwavWN12BeBBXg linux-2.6.11-xen-sparse/include/asm-xen/foreign_page.h
    1.15 -412dfaeazclyNDM0cpnp60Yo4xulpQ linux-2.6.11-xen-sparse/include/asm-xen/gnttab.h
    1.16  40f5623aGPlsm0u1LTO-NVZ6AGzNRQ linux-2.6.11-xen-sparse/include/asm-xen/hypervisor.h
    1.17  3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
    1.18  3fa8e3f0kBLeE4To2vpdi3cpJbIkbQ linux-2.6.11-xen-sparse/include/asm-xen/linux-public/suspend.h
    17.1 --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c	Thu Apr 28 15:12:37 2005 +0000
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,391 +0,0 @@
    17.4 -/******************************************************************************
    17.5 - * gnttab.c
    17.6 - * 
    17.7 - * Two sets of functionality:
    17.8 - * 1. Granting foreign access to our memory reservation.
    17.9 - * 2. Accessing others' memory reservations via grant references.
   17.10 - * (i.e., mechanisms for both sender and recipient of grant references)
   17.11 - * 
   17.12 - * Copyright (c) 2005, Christopher Clark
   17.13 - * Copyright (c) 2004, K A Fraser
   17.14 - */
   17.15 -
   17.16 -#include <linux/config.h>
   17.17 -#include <linux/module.h>
   17.18 -#include <linux/sched.h>
   17.19 -#include <asm/pgtable.h>
   17.20 -#include <asm/fixmap.h>
   17.21 -#include <asm/uaccess.h>
   17.22 -#include <asm-xen/xen_proc.h>
   17.23 -#include <asm-xen/linux-public/privcmd.h>
   17.24 -#include <asm-xen/gnttab.h>
   17.25 -
   17.26 -#ifndef set_fixmap_ma
   17.27 -#define set_fixmap_ma set_fixmap
   17.28 -#endif
   17.29 -
   17.30 -#if 1
   17.31 -#define ASSERT(_p) \
   17.32 -    if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
   17.33 -    #_p , __LINE__, __FILE__); *(int*)0=0; }
   17.34 -#else
   17.35 -#define ASSERT(_p) ((void)0)
   17.36 -#endif
   17.37 -
   17.38 -#define WPRINTK(fmt, args...) \
   17.39 -    printk(KERN_WARNING "xen_grant: " fmt, ##args)
   17.40 -
   17.41 -
   17.42 -EXPORT_SYMBOL(gnttab_grant_foreign_access);
   17.43 -EXPORT_SYMBOL(gnttab_end_foreign_access);
   17.44 -EXPORT_SYMBOL(gnttab_query_foreign_access);
   17.45 -EXPORT_SYMBOL(gnttab_grant_foreign_transfer);
   17.46 -EXPORT_SYMBOL(gnttab_end_foreign_transfer);
   17.47 -EXPORT_SYMBOL(gnttab_alloc_grant_references);
   17.48 -EXPORT_SYMBOL(gnttab_free_grant_references);
   17.49 -EXPORT_SYMBOL(gnttab_claim_grant_reference);
   17.50 -EXPORT_SYMBOL(gnttab_release_grant_reference);
   17.51 -EXPORT_SYMBOL(gnttab_grant_foreign_access_ref);
   17.52 -EXPORT_SYMBOL(gnttab_grant_foreign_transfer_ref);
   17.53 -
   17.54 -static grant_ref_t gnttab_free_list[NR_GRANT_ENTRIES];
   17.55 -static grant_ref_t gnttab_free_head;
   17.56 -
   17.57 -static grant_entry_t *shared;
   17.58 -
   17.59 -/*
   17.60 - * Lock-free grant-entry allocator
   17.61 - */
   17.62 -
   17.63 -static inline int
   17.64 -get_free_entry(
   17.65 -    void)
   17.66 -{
   17.67 -    grant_ref_t fh, nfh = gnttab_free_head;
   17.68 -    do { if ( unlikely((fh = nfh) == NR_GRANT_ENTRIES) ) return -1; }
   17.69 -    while ( unlikely((nfh = cmpxchg(&gnttab_free_head, fh,
   17.70 -                                    gnttab_free_list[fh])) != fh) );
   17.71 -    return fh;
   17.72 -}
   17.73 -
   17.74 -static inline void
   17.75 -put_free_entry(
   17.76 -    grant_ref_t ref)
   17.77 -{
   17.78 -    grant_ref_t fh, nfh = gnttab_free_head;
   17.79 -    do { gnttab_free_list[ref] = fh = nfh; wmb(); }
   17.80 -    while ( unlikely((nfh = cmpxchg(&gnttab_free_head, fh, ref)) != fh) );
   17.81 -}
   17.82 -
   17.83 -/*
   17.84 - * Public grant-issuing interface functions
   17.85 - */
   17.86 -
   17.87 -int
   17.88 -gnttab_grant_foreign_access(
   17.89 -    domid_t domid, unsigned long frame, int readonly)
   17.90 -{
   17.91 -    int ref;
   17.92 -    
   17.93 -    if ( unlikely((ref = get_free_entry()) == -1) )
   17.94 -        return -ENOSPC;
   17.95 -
   17.96 -    shared[ref].frame = frame;
   17.97 -    shared[ref].domid = domid;
   17.98 -    wmb();
   17.99 -    shared[ref].flags = GTF_permit_access | (readonly ? GTF_readonly : 0);
  17.100 -
  17.101 -    return ref;
  17.102 -}
  17.103 -
  17.104 -void
  17.105 -gnttab_grant_foreign_access_ref(
  17.106 -    grant_ref_t ref, domid_t domid, unsigned long frame, int readonly)
  17.107 -{
  17.108 -    shared[ref].frame = frame;
  17.109 -    shared[ref].domid = domid;
  17.110 -    wmb();
  17.111 -    shared[ref].flags = GTF_permit_access | (readonly ? GTF_readonly : 0);
  17.112 -}
  17.113 -
  17.114 -
  17.115 -int
  17.116 -gnttab_query_foreign_access( grant_ref_t ref )
  17.117 -{
  17.118 -    u16 nflags;
  17.119 -
  17.120 -    nflags = shared[ref].flags;
  17.121 -
  17.122 -    return ( nflags & (GTF_reading|GTF_writing) );
  17.123 -}
  17.124 -
  17.125 -void
  17.126 -gnttab_end_foreign_access( grant_ref_t ref, int readonly )
  17.127 -{
  17.128 -    u16 flags, nflags;
  17.129 -
  17.130 -    nflags = shared[ref].flags;
  17.131 -    do {
  17.132 -        if ( (flags = nflags) & (GTF_reading|GTF_writing) )
  17.133 -            printk(KERN_ALERT "WARNING: g.e. still in use!\n");
  17.134 -    }
  17.135 -    while ( (nflags = cmpxchg(&shared[ref].flags, flags, 0)) != flags );
  17.136 -
  17.137 -    put_free_entry(ref);
  17.138 -}
  17.139 -
  17.140 -int
  17.141 -gnttab_grant_foreign_transfer(
  17.142 -    domid_t domid, unsigned long pfn )
  17.143 -{
  17.144 -    int ref;
  17.145 -
  17.146 -    if ( unlikely((ref = get_free_entry()) == -1) )
  17.147 -        return -ENOSPC;
  17.148 -
  17.149 -    shared[ref].frame = pfn;
  17.150 -    shared[ref].domid = domid;
  17.151 -    wmb();
  17.152 -    shared[ref].flags = GTF_accept_transfer;
  17.153 -
  17.154 -    return ref;
  17.155 -}
  17.156 -
  17.157 -void
  17.158 -gnttab_grant_foreign_transfer_ref(
  17.159 -    grant_ref_t ref, domid_t domid, unsigned long pfn )
  17.160 -{
  17.161 -    shared[ref].frame = pfn;
  17.162 -    shared[ref].domid = domid;
  17.163 -    wmb();
  17.164 -    shared[ref].flags = GTF_accept_transfer;
  17.165 -}
  17.166 -
  17.167 -unsigned long
  17.168 -gnttab_end_foreign_transfer(
  17.169 -    grant_ref_t ref)
  17.170 -{
  17.171 -    unsigned long frame = 0;
  17.172 -    u16           flags;
  17.173 -
  17.174 -    flags = shared[ref].flags;
  17.175 -    ASSERT(flags == (GTF_accept_transfer | GTF_transfer_committed));
  17.176 -
  17.177 -    /*
  17.178 -     * If a transfer is committed then wait for the frame address to appear.
  17.179 -     * Otherwise invalidate the grant entry against future use.
  17.180 -     */
  17.181 -    if ( likely(flags != GTF_accept_transfer) ||
  17.182 -         (cmpxchg(&shared[ref].flags, flags, 0) != GTF_accept_transfer) )
  17.183 -        while ( unlikely((frame = shared[ref].frame) == 0) )
  17.184 -            cpu_relax();
  17.185 -
  17.186 -    put_free_entry(ref);
  17.187 -
  17.188 -    return frame;
  17.189 -}
  17.190 -
  17.191 -void
  17.192 -gnttab_free_grant_references( u16 count, grant_ref_t head )
  17.193 -{
  17.194 -    /* TODO: O(N)...? */
  17.195 -    grant_ref_t to_die = 0, next = head;
  17.196 -    int i;
  17.197 -
  17.198 -    for ( i = 0; i < count; i++ )
  17.199 -        to_die = next;
  17.200 -        next = gnttab_free_list[next];
  17.201 -        put_free_entry( to_die );
  17.202 -}
  17.203 -
  17.204 -int
  17.205 -gnttab_alloc_grant_references( u16 count,
  17.206 -                               grant_ref_t *head,
  17.207 -                               grant_ref_t *terminal )
  17.208 -{
  17.209 -    int i;
  17.210 -    grant_ref_t h = gnttab_free_head;
  17.211 -
  17.212 -    for ( i = 0; i < count; i++ )
  17.213 -        if ( unlikely(get_free_entry() == -1) )
  17.214 -            goto not_enough_refs;
  17.215 -
  17.216 -    *head = h;
  17.217 -    *terminal = gnttab_free_head;
  17.218 -
  17.219 -    return 0;
  17.220 -
  17.221 -not_enough_refs:
  17.222 -    gnttab_free_head = h;
  17.223 -    return -ENOSPC;
  17.224 -}
  17.225 -
  17.226 -int
  17.227 -gnttab_claim_grant_reference( grant_ref_t *private_head,
  17.228 -                              grant_ref_t  terminal )
  17.229 -{
  17.230 -    grant_ref_t g;
  17.231 -    if ( unlikely((g = *private_head) == terminal) )
  17.232 -        return -ENOSPC;
  17.233 -    *private_head = gnttab_free_list[g];
  17.234 -    return g;
  17.235 -}
  17.236 -
  17.237 -void
  17.238 -gnttab_release_grant_reference( grant_ref_t *private_head,
  17.239 -                                grant_ref_t  release )
  17.240 -{
  17.241 -    gnttab_free_list[release] = *private_head;
  17.242 -    *private_head = release;
  17.243 -}
  17.244 -
  17.245 -/*
  17.246 - * ProcFS operations
  17.247 - */
  17.248 -
  17.249 -#ifdef CONFIG_PROC_FS
  17.250 -
  17.251 -static struct proc_dir_entry *grant_pde;
  17.252 -
  17.253 -static int grant_ioctl(struct inode *inode, struct file *file,
  17.254 -                       unsigned int cmd, unsigned long data)
  17.255 -{
  17.256 -    int                     ret;
  17.257 -    privcmd_hypercall_t     hypercall;
  17.258 -
  17.259 -    /* XXX Need safety checks here if using for anything other
  17.260 -     *     than debugging */
  17.261 -    return -ENOSYS;
  17.262 -
  17.263 -    if ( cmd != IOCTL_PRIVCMD_HYPERCALL )
  17.264 -        return -ENOSYS;
  17.265 -
  17.266 -    if ( copy_from_user(&hypercall, (void *)data, sizeof(hypercall)) )
  17.267 -        return -EFAULT;
  17.268 -
  17.269 -    if ( hypercall.op != __HYPERVISOR_grant_table_op )
  17.270 -        return -ENOSYS;
  17.271 -
  17.272 -    /* hypercall-invoking asm taken from privcmd.c */
  17.273 -    __asm__ __volatile__ (
  17.274 -        "pushl %%ebx; pushl %%ecx; pushl %%edx; pushl %%esi; pushl %%edi; "
  17.275 -        "movl  4(%%eax),%%ebx ;"
  17.276 -        "movl  8(%%eax),%%ecx ;"
  17.277 -        "movl 12(%%eax),%%edx ;"
  17.278 -        "movl 16(%%eax),%%esi ;"
  17.279 -        "movl 20(%%eax),%%edi ;"
  17.280 -        "movl   (%%eax),%%eax ;"
  17.281 -        TRAP_INSTR "; "
  17.282 -        "popl %%edi; popl %%esi; popl %%edx; popl %%ecx; popl %%ebx"
  17.283 -        : "=a" (ret) : "0" (&hypercall) : "memory" );
  17.284 -
  17.285 -    return ret;
  17.286 -}
  17.287 -
  17.288 -static struct file_operations grant_file_ops = {
  17.289 -    ioctl:  grant_ioctl,
  17.290 -};
  17.291 -
  17.292 -static int grant_read(char *page, char **start, off_t off,
  17.293 -                      int count, int *eof, void *data)
  17.294 -{
  17.295 -    int             len;
  17.296 -    unsigned int    i;
  17.297 -    grant_entry_t  *gt;
  17.298 -
  17.299 -    gt = (grant_entry_t *)shared;
  17.300 -    len = 0;
  17.301 -
  17.302 -    for ( i = 0; i < NR_GRANT_ENTRIES; i++ )
  17.303 -        /* TODO: safety catch here until this can handle >PAGE_SIZE output */
  17.304 -        if (len > (PAGE_SIZE - 200))
  17.305 -        {
  17.306 -            len += sprintf( page + len, "Truncated.\n");
  17.307 -            break;
  17.308 -        }
  17.309 -
  17.310 -        if ( gt[i].flags )
  17.311 -            len += sprintf( page + len,
  17.312 -                    "Grant: ref (0x%x) flags (0x%hx) dom (0x%hx) frame (0x%x)\n", 
  17.313 -                    i,
  17.314 -                    gt[i].flags,
  17.315 -                    gt[i].domid,
  17.316 -                    gt[i].frame );
  17.317 -
  17.318 -    *eof = 1;
  17.319 -    return len;
  17.320 -}
  17.321 -
  17.322 -static int grant_write(struct file *file, const char __user *buffer,
  17.323 -                       unsigned long count, void *data)
  17.324 -{
  17.325 -    /* TODO: implement this */
  17.326 -    return -ENOSYS;
  17.327 -}
  17.328 -
  17.329 -#endif /* CONFIG_PROC_FS */
  17.330 -
  17.331 -int gnttab_resume(void)
  17.332 -{
  17.333 -    gnttab_setup_table_t setup;
  17.334 -    unsigned long        frames[NR_GRANT_FRAMES];
  17.335 -    int                  i;
  17.336 -
  17.337 -    setup.dom        = DOMID_SELF;
  17.338 -    setup.nr_frames  = NR_GRANT_FRAMES;
  17.339 -    setup.frame_list = frames;
  17.340 -
  17.341 -    BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1) != 0);
  17.342 -    BUG_ON(setup.status != 0);
  17.343 -
  17.344 -    for ( i = 0; i < NR_GRANT_FRAMES; i++ )
  17.345 -        set_fixmap_ma(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
  17.346 -
  17.347 -    return 0;
  17.348 -}
  17.349 -
  17.350 -int gnttab_suspend(void)
  17.351 -{
  17.352 -    int i;
  17.353 -
  17.354 -    for ( i = 0; i < NR_GRANT_FRAMES; i++ )
  17.355 -	clear_fixmap(FIX_GNTTAB_END - i);
  17.356 -
  17.357 -    return 0;
  17.358 -}
  17.359 -
  17.360 -static int __init gnttab_init(void)
  17.361 -{
  17.362 -    int i;
  17.363 -
  17.364 -    BUG_ON(gnttab_resume());
  17.365 -
  17.366 -    shared = (grant_entry_t *)fix_to_virt(FIX_GNTTAB_END);
  17.367 -
  17.368 -    for ( i = 0; i < NR_GRANT_ENTRIES; i++ )
  17.369 -        gnttab_free_list[i] = i + 1;
  17.370 -    
  17.371 -#ifdef CONFIG_PROC_FS
  17.372 -    /*
  17.373 -     *  /proc/xen/grant : used by libxc to access grant tables
  17.374 -     */
  17.375 -    if ( (grant_pde = create_xen_proc_entry("grant", 0600)) == NULL )
  17.376 -    {
  17.377 -        WPRINTK("Unable to create grant xen proc entry\n");
  17.378 -        return -1;
  17.379 -    }
  17.380 -
  17.381 -    grant_file_ops.read   = grant_pde->proc_fops->read;
  17.382 -    grant_file_ops.write  = grant_pde->proc_fops->write;
  17.383 -
  17.384 -    grant_pde->proc_fops  = &grant_file_ops;
  17.385 -
  17.386 -    grant_pde->read_proc  = &grant_read;
  17.387 -    grant_pde->write_proc = &grant_write;
  17.388 -#endif
  17.389 -
  17.390 -    printk("Grant table initialized\n");
  17.391 -    return 0;
  17.392 -}
  17.393 -
  17.394 -__initcall(gnttab_init);
    27.1 --- a/linux-2.6.11-xen-sparse/include/asm-xen/gnttab.h	Thu Apr 28 15:12:37 2005 +0000
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,72 +0,0 @@
    27.4 -/******************************************************************************
    27.5 - * gnttab.h
    27.6 - * 
    27.7 - * Two sets of functionality:
    27.8 - * 1. Granting foreign access to our memory reservation.
    27.9 - * 2. Accessing others' memory reservations via grant references.
   27.10 - * (i.e., mechanisms for both sender and recipient of grant references)
   27.11 - * 
   27.12 - * Copyright (c) 2004, K A Fraser
   27.13 - * Copyright (c) 2005, Christopher Clark
   27.14 - */
   27.15 -
   27.16 -#ifndef __ASM_GNTTAB_H__
   27.17 -#define __ASM_GNTTAB_H__
   27.18 -
   27.19 -#include <linux/config.h>
   27.20 -#include <asm-xen/hypervisor.h>
   27.21 -#include <asm-xen/xen-public/grant_table.h>
   27.22 -
   27.23 -/* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */
   27.24 -#define NR_GRANT_FRAMES 4
   27.25 -#define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
   27.26 -
   27.27 -int
   27.28 -gnttab_grant_foreign_access(
   27.29 -    domid_t domid, unsigned long frame, int readonly);
   27.30 -
   27.31 -void
   27.32 -gnttab_end_foreign_access(
   27.33 -    grant_ref_t ref, int readonly);
   27.34 -
   27.35 -int
   27.36 -gnttab_grant_foreign_transfer(
   27.37 -    domid_t domid, unsigned long pfn);
   27.38 -
   27.39 -unsigned long
   27.40 -gnttab_end_foreign_transfer(
   27.41 -    grant_ref_t ref);
   27.42 -
   27.43 -int
   27.44 -gnttab_query_foreign_access( 
   27.45 -    grant_ref_t ref );
   27.46 -
   27.47 -/*
   27.48 - * operations on reserved batches of grant references
   27.49 - */
   27.50 -int
   27.51 -gnttab_alloc_grant_references(
   27.52 -    u16 count, grant_ref_t *pprivate_head, grant_ref_t *private_terminal );
   27.53 -
   27.54 -void
   27.55 -gnttab_free_grant_references(
   27.56 -    u16 count, grant_ref_t private_head );
   27.57 -
   27.58 -int
   27.59 -gnttab_claim_grant_reference( grant_ref_t *pprivate_head, grant_ref_t terminal
   27.60 -);
   27.61 -
   27.62 -void
   27.63 -gnttab_release_grant_reference(
   27.64 -    grant_ref_t *private_head, grant_ref_t release );
   27.65 -
   27.66 -void
   27.67 -gnttab_grant_foreign_access_ref(
   27.68 -    grant_ref_t ref, domid_t domid, unsigned long frame, int readonly);
   27.69 -
   27.70 -void
   27.71 -gnttab_grant_foreign_transfer_ref(
   27.72 -    grant_ref_t, domid_t domid, unsigned long pfn);
   27.73 -
   27.74 -
   27.75 -#endif /* __ASM_GNTTAB_H__ */