From: Daniel Stodden Subject: Re: about grant table Date: Tue, 04 Mar 2008 16:26:04 +0100 Message-ID: <1204644364.6184.14.camel@thinkpad.localdomain> References: <298d852f0803032220n136b8033l30780c508d14d549@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <298d852f0803032220n136b8033l30780c508d14d549@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: =?UTF-8?Q?=E4=BD=99=E4=B8=8A?= Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, 2008-03-04 at 14:20 +0800, =E4=BD=99=E4=B8=8A wrote:=20 > Hi All, > I want to know how the frame number get populated ? It seems the > active entry's frame is the key point to grant table's functionality . > I just find it is updated from share entry's , but how about share > entry's ? Thank you Well, the shared table is shared by the the granting guest OS and Xen. Data from the shared entry is copied to an active entry (private to Xen) as soon as grantees make use of an entry therein. So, e.g. 1. domU writes a shared entry at index 2. communicates gref to dom0 3. dom0 maps the frame (by ref) -> xen activates the entry 4. dom0 releases the frame -> xen releases the entry 5. domU may reuse the granted frame Xen updates the status information in the shared entry on 3. and 4., so the granter can inquire whether the granted frame remains in use. Note that it can revoke the grant at any time, disallowing mappings or transfers, but it cannot enforce immediate release of mapped frames on the grantees side. hth, daniel --=20 Daniel Stodden LRR - Lehrstuhl f=C3=BCr Rechnertechnik und Rechnerorganisation Institut f=C3=BCr Informatik der TU M=C3=BCnchen D-85748 Garc= hing http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B