# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Node ID 3434966aa3d1aca4c6f04323c9d2e900a1084417 # Parent 03e1295121243a3ff53253b276e9b33030f0276f change the type of grant_mapping_t::ref_and_flags from u16 to u32 for xen/ia64. xen/x86 u16 grant_mapping_t::ref_and_flags can handle up to 2048 entries because 5bits is used for other purpose. On the other hand with 16Kbyte page size of xen/ia64 (BLK_RING_SIZE + NET_RX_RING_SIZE + NET_TX_RING_SIZE) > 2048. Thus more bits is needed. PATCHNAME: grant_mapping_t_ref_and_flags_from_u16_to_u32 Signed-off-by: Isaku Yamahata diff -r 03e129512124 -r 3434966aa3d1 xen/include/xen/grant_table.h --- a/xen/include/xen/grant_table.h Mon Apr 10 16:39:11 2006 +0900 +++ b/xen/include/xen/grant_table.h Mon Apr 10 16:39:12 2006 +0900 @@ -60,6 +60,18 @@ typedef struct { * 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'. */ +#ifdef __ia64__ +// xen/IA64 needs more than 2^11 = 2048 entries because +// (BLK_RING_SIZE + NET_RX_RING_SIZE + NET_TX_RING_SIZE) > 2048 +// with 16KB page size. +typedef struct { + u32 ref_and_flags; /* 0-4: GNTMAP_* ; 5-31: grant ref */ + domid_t domid; /* granting domain */ +} grant_mapping_t; +#define MAPTRACK_GNTMAP_MASK 0x1f +#define MAPTRACK_REF_SHIFT 5 +#define MAPTRACK_MAX_ENTRIES (1 << (32 - MAPTRACK_REF_SHIFT)) +#else typedef struct { u16 ref_and_flags; /* 0-4: GNTMAP_* ; 5-15: grant ref */ domid_t domid; /* granting domain */ @@ -67,6 +79,7 @@ typedef struct { #define MAPTRACK_GNTMAP_MASK 0x1f #define MAPTRACK_REF_SHIFT 5 #define MAPTRACK_MAX_ENTRIES (1 << (16 - MAPTRACK_REF_SHIFT)) +#endif /* Per-domain grant information. */ typedef struct {