All of lore.kernel.org
 help / color / mirror / Atom feed
* about grant table
@ 2008-03-04  6:20 余上
  2008-03-04 15:26 ` Daniel Stodden
  0 siblings, 1 reply; 9+ messages in thread
From: 余上 @ 2008-03-04  6:20 UTC (permalink / raw)
  To: xen-devel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: about grant table
  2008-03-04  6:20 about grant table 余上
@ 2008-03-04 15:26 ` Daniel Stodden
  2008-03-04 16:07   ` 余上
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Stodden @ 2008-03-04 15:26 UTC (permalink / raw)
  To: 余上; +Cc: 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 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 <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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: about grant table
  2008-03-04 15:26 ` Daniel Stodden
@ 2008-03-04 16:07   ` 余上
  2008-03-04 16:16     ` Daniel Stodden
  0 siblings, 1 reply; 9+ messages in thread
From: 余上 @ 2008-03-04 16:07 UTC (permalink / raw)
  To: Daniel Stodden; +Cc: xen-devel

>  1. domU writes a shared entry at index <gref>
So I guess there needs a transfer between guest OS and Xen ?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: about grant table
  2008-03-04 16:07   ` 余上
@ 2008-03-04 16:16     ` Daniel Stodden
  2008-03-04 16:37       ` 余上
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Stodden @ 2008-03-04 16:16 UTC (permalink / raw)
  To: 余上; +Cc: 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: about grant table
  2008-03-04 16:16     ` Daniel Stodden
@ 2008-03-04 16:37       ` 余上
  2008-03-04 16:55         ` Daniel Stodden
  0 siblings, 1 reply; 9+ messages in thread
From: 余上 @ 2008-03-04 16:37 UTC (permalink / raw)
  To: Daniel Stodden; +Cc: 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 .

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: about grant table
  2008-03-04 16:37       ` 余上
@ 2008-03-04 16:55         ` Daniel Stodden
  2008-03-04 17:42           ` 余上
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Stodden @ 2008-03-04 16:55 UTC (permalink / raw)
  To: 余上; +Cc: 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: about grant table
  2008-03-04 16:55         ` Daniel Stodden
@ 2008-03-04 17:42           ` 余上
  2008-03-04 17:45             ` Daniel Stodden
  0 siblings, 1 reply; 9+ messages in thread
From: 余上 @ 2008-03-04 17:42 UTC (permalink / raw)
  To: Daniel Stodden; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

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
>
>
>

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: about grant table
  2008-03-04 17:42           ` 余上
@ 2008-03-04 17:45             ` Daniel Stodden
  2008-03-05  7:52               ` about synchroniztion of migration tgh
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Stodden @ 2008-03-04 17:45 UTC (permalink / raw)
  To: 余上; +Cc: 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* about synchroniztion of migration
  2008-03-04 17:45             ` Daniel Stodden
@ 2008-03-05  7:52               ` tgh
  0 siblings, 0 replies; 9+ messages in thread
From: tgh @ 2008-03-05  7:52 UTC (permalink / raw)
  To: Brendan Cully; +Cc: xen-devel, Daniel Stodden

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-03-05  7:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-04  6:20 about grant table 余上
2008-03-04 15:26 ` Daniel Stodden
2008-03-04 16:07   ` 余上
2008-03-04 16:16     ` Daniel Stodden
2008-03-04 16:37       ` 余上
2008-03-04 16:55         ` Daniel Stodden
2008-03-04 17:42           ` 余上
2008-03-04 17:45             ` Daniel Stodden
2008-03-05  7:52               ` about synchroniztion of migration tgh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.