debuggers.hg

view freebsd-5.3-xen-sparse/i386-xen/include/gnttab.h @ 4628:35357e323f14

bitkeeper revision 1.1338 (4266317ezHysqYzH_WRvfueqwU4i4Q)

Grant tables for FreeBSD.
Signed-off-by: Kip Macy <kmacy@fsmware.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Apr 20 10:39:58 2005 +0000 (2005-04-20)
parents
children
line source
1 /******************************************************************************
2 * gnttab.h
3 *
4 * Two sets of functionality:
5 * 1. Granting foreign access to our memory reservation.
6 * 2. Accessing others' memory reservations via grant references.
7 * (i.e., mechanisms for both sender and recipient of grant references)
8 *
9 * Copyright (c) 2004, K A Fraser
10 * Copyright (c) 2005, Christopher Clark
11 */
13 #ifndef __ASM_GNTTAB_H__
14 #define __ASM_GNTTAB_H__
16 #include <machine/hypervisor.h>
17 #include <machine/hypervisor-ifs.h>
19 /* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */
20 #define NR_GRANT_FRAMES 4
21 #define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
23 int
24 gnttab_grant_foreign_access(
25 domid_t domid, unsigned long frame, int readonly);
27 void
28 gnttab_end_foreign_access(
29 grant_ref_t ref, int readonly);
31 int
32 gnttab_grant_foreign_transfer(
33 domid_t domid, unsigned long pfn);
35 unsigned long
36 gnttab_end_foreign_transfer(
37 grant_ref_t ref);
39 int
40 gnttab_query_foreign_access(
41 grant_ref_t ref );
43 /*
44 * operations on reserved batches of grant references
45 */
46 int
47 gnttab_alloc_grant_references(
48 uint16_t count, grant_ref_t *pprivate_head, grant_ref_t *private_terminal );
50 void
51 gnttab_free_grant_references(
52 uint16_t count, grant_ref_t private_head );
54 int
55 gnttab_claim_grant_reference( grant_ref_t *pprivate_head, grant_ref_t terminal
56 );
58 void
59 gnttab_release_grant_reference(
60 grant_ref_t *private_head, grant_ref_t release );
62 void
63 gnttab_grant_foreign_access_ref(
64 grant_ref_t ref, domid_t domid, unsigned long frame, int readonly);
66 void
67 gnttab_grant_foreign_transfer_ref(
68 grant_ref_t, domid_t domid, unsigned long pfn);
71 #endif /* __ASM_GNTTAB_H__ */