From dc6f500bc6ae6908b93f132733ff9944592be52f Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 16 Jun 2015 12:29:18 +0200 Subject: [PATCH] gnttab: make struct grant_mapping private This documents that no entity outside of gnttab.c actually accesses objects of that type, which is particularly important with the now more fine grained locking in place. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- xen/common/grant_table.c | 10 ++++++++++ xen/include/xen/grant_table.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index 51500bf7b7..a011276f2b 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -113,6 +113,16 @@ struct gnttab_unmap_common { goto _lbl; \ } while ( 0 ) +/* + * Tracks a mapping of another domain's grant reference. Each domain has a + * table of these, indexes into which are returned as a 'mapping handle'. + */ +struct grant_mapping { + u32 ref; /* grant ref */ + u16 flags; /* 0-4: GNTMAP_* ; 5-15: unused */ + domid_t domid; /* granting domain */ +}; + #define MAPTRACK_PER_PAGE (PAGE_SIZE / sizeof(struct grant_mapping)) #define maptrack_entry(t, e) \ ((t)->maptrack[(e)/MAPTRACK_PER_PAGE][(e)%MAPTRACK_PER_PAGE]) diff --git a/xen/include/xen/grant_table.h b/xen/include/xen/grant_table.h index f22ebd0788..9536331c07 100644 --- a/xen/include/xen/grant_table.h +++ b/xen/include/xen/grant_table.h @@ -52,16 +52,6 @@ /* The maximum size of a grant table. */ extern unsigned int max_grant_frames; -/* - * Tracks a mapping of another domain's grant reference. Each domain has a - * table of these, indexes into which are returned as a 'mapping handle'. - */ -struct grant_mapping { - u32 ref; /* grant ref */ - u16 flags; /* 0-4: GNTMAP_* ; 5-15: unused */ - domid_t domid; /* granting domain */ -}; - /* Per-domain grant information. */ struct grant_table { /* -- 2.39.5