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 Best regards yushang _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, 2008-03-04 at 14:20 +0800, 余上 wrote:> 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 youWell, 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 <gref> 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 -- Daniel Stodden LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation Institut für Informatik der TU München D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 1. domU writes a shared entry at index <gref>So I guess there needs a transfer between guest OS and Xen ? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2008-03-05 at 00:07 +0800, 余上 wrote:> > 1. domU writes a shared entry at index <gref> > So I guess there needs a transfer between guest OS and Xen ?not sure what you mean. grant transfer? certainly not. control transfer? also not. grant tables are just a bunch of pages allocated to the domain during creation. mapped r/w both by the hypervisor and the guest. the guest writes the bigger part of its entries. shared flags are altered atomically via compare-and-swap instructions from both sides. the active entries are because xen needs to keep the fields private once they are in use. regards, daniel -- Daniel Stodden LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation Institut für Informatik der TU München D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> not sure what you mean. grant transfer? certainly not. control transfer? > also not.I mean grant table transfer hypercall , because there I find the share entry''s frame get updated . _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2008-03-05 at 00:37 +0800, 余上 wrote:> > not sure what you mean. grant transfer? certainly not. control transfer? > > also not. > I mean grant table transfer hypercall , because there I find the share > entry''s frame get updated .For a transfer: yes. After all, the granting domain needs to know the replaced frame number. -- Daniel Stodden LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation Institut für Informatik der TU München D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Thanks . I think I got it : guest OS communicates the grant info with Xen by the "shared" array . When the granted domain wants to access the shared page , it asks Xen to map into its address space , here is the "active" array come into being , right ? 2008/3/5, Daniel Stodden <stodden@cs.tum.edu>:> > On Wed, 2008-03-05 at 00:37 +0800, 余上 wrote: > > > not sure what you mean. grant transfer? certainly not. control transfer? > > > also not. > > I mean grant table transfer hypercall , because there I find the share > > entry's frame get updated . > > > For a transfer: yes. After all, the granting domain needs to know the > replaced frame number. > > > -- > Daniel Stodden > LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation > Institut für Informatik der TU München D-85748 Garching > http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu > PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2008-03-05 at 01:42 +0800, 余上 wrote:> Thanks . I think I got it : guest OS communicates the grant info with > Xen by the "shared" array . When the granted domain wants to access > the shared page , it asks Xen to map into its address space , here is > the "active" array come into being , right ?You absolutely got it. -- Daniel Stodden LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation Institut für Informatik der TU München D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
hi I have read your ppt on xen summit,and i try to read the migration code,but have some confusions In your ppt it has been pointed out that: 1)Many synchronous forks for external device migration (4 stages for each attached device) 2)Xenstore callbacks from host to guest and back to initiate final round, and from bridge to checkpoint daemon I try to read the code ,and find the synchronization between hostOS and guestOS,and between the XC_SAVE and saveInputHandler,but where is synchronization between the bridge to the checkpoint daemon, and how does the device migration do synchronization, i have read the code of XC_SAVE and device migrate,and find the step1,3,4, but i could not find out how does the synchronization work,could you give me some detailed expalanation about it ,or where the code are ? another question is about how does the network transfered from sources to destination? that is ,where is the code,and how is it invoked? Thanks _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel