6. Grant tables
Xen's grant tables provide a generic mechanism to memory sharing
between domains. This shared memory interface underpins the split
device drivers for block and network IO.
Each domain has its own grant table. This is a data structure
that is shared with Xen; it allows the domain to tell Xen what kind of
permissions other domains have on its pages. Entries in the grant
table are identified by grant references. A grant reference is
an integer, which indexes into the grant table. It acts as a
capability which the grantee can use to perform operations on the
granter's memory.
This capability-based system allows shared-memory communications
between unprivileged domains. A grant reference also encapsulates the
details of a shared page, removing the need for a domain to know the
real machine address of a page it is sharing. This makes it possible
to share memory correctly with domains running in fully virtualised
memory.