Grant Table

From Xen
Revision as of 11:22, 29 April 2013 by WeiLiu (talk | contribs) (Created page with "==General Idea== Interface fro granting foreign access to page frames, and receiving page-ownership transfer. Now there are two versions of grant table ABI. Version 1 is maintai…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

General Idea

Interface fro granting foreign access to page frames, and receiving page-ownership transfer. Now there are two versions of grant table ABI. Version 1 is maintained for backward compatibility. New guests should use version 2.

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.

Reference Implementation

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/xen/grant-table.c?id=HEAD

For complete and up-to-date information, please refer to Xen header file include/public/grant_table.h. The content of this page is taken from that header file and slightly modified.