Skip to contentSkip to conversation

Two question about grant table mechanism

DISCUSSION Lily Huang 2 participants 2 messages Jun 19, 2006

lore
Share & tools
lore

Lily Huang

author
#0 lore raw

First question:

If domA grant access permission of a page to DomB, and domB remapped this page but then it crashes or failed to end mapping. Now domA wants to end page granting, what will happen? Is there any way for page owner to actively stop other VM's mapping?

Second question:
If domA grant read-only permission on a page to domB, but domB tries to write some data to this page. What will happen? General Memory Protection?

These two questions are very important to my research. Can someone give me a answer to direct me somewhere so that I can read more details about grant table.

Many thanks!
-lily

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 3 lines · Lily Huang

First question:

If domA grant access permission of a page to DomB, and domB remapped this page but then it crashes or failed to end mapping. Now domA wants to end page granting, what will happen? Is there any way for page owner to actively stop other VM's mapping?

No, it's expected you'll have an out-of-band mechanism for reclaiming the mapping, probably involving killing the offending DomB. This makes sense for the original usage scenario of driver domains, where if a backend driver has gone bad or got hung, merely getting back any current grants is unlikely to unstick things: you need a bigger hammer.

There's been discussion of other kinds of memory sharing mechanism which wouldn't have this problem -- a domain puts some memory to one side when it maps shared memory, which can then be revoked from under its feet by mapping the memory it put to one side in the shared memory's place. I think Rusty's patches implement something like this.

Quoted 2 lines

Second question:
If domA grant read-only permission on a page to domB, but domB tries to write some data to this page. What will happen? General Memory Protection?

DomB can only map the page read only, so write accesses will generate a page fault.

-- Keir

Quoted 8 lines

These two questions are very important to my research. Can someone give me a answer to direct me somewhere so that I can read more details about grant table.

Many thanks!
-lily
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel