|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Information required on the pinning/unpinning of shadow.
Hi all,
Looking at the following code snippets could anybody explain what is the
purpose and
meaning of the pinning and unpinning and hooking/unhook of the shadow/subshadow?
Please correct my question if it seems some information missing in it.
xen-3.0.3_0-src\xen\arch\x86\mm\shadow\common.c
void shadow_prealloc(struct domain *d, unsigned int order)
{
/* Need a vpcu for calling unpins; for now, since we don't have
* per-vcpu shadows, any will do */
struct vcpu *v = d->vcpu[0];
....
/* For PAE, we need to unpin each subshadow on this shadow */
SHADOW_INTERNAL_NAME(sh_unpin_all_l3_subshadows,3,3)(v, smfn);
}
else
#endif /* 32-bit code always takes this branch */
{
/* Unpin this top-level shadow */
sh_unpin(v, smfn);
.....
shadow_unhook_mappings(v, smfn);
....
Also in the following code what is PGC_SH_pinned doing internally?
xen-3.0.3_0-src\xen\arch\x86\mm\shadow\private.h
/* Unpin a shadow page: unset the pin bit and release the extra ref. */
static inline void sh_unpin(struct vcpu *v, mfn_t smfn)
{
struct page_info *page;
ASSERT(mfn_valid(smfn));
page = mfn_to_page(smfn);
if ( page->count_info & PGC_SH_pinned )
{
page->count_info &= ~PGC_SH_pinned;
sh_put_ref(v, smfn, 0);
}
}
xen-3.0.3_0-src\xen\include\asm-x86\mm.h
#define PGC_SH_pinned (1U<<27)
With Best Regards,
Aditya Shevalkar.
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] Information required on the pinning/unpinning of shadow.,
aditya shevalkar <=
|
|
|
|
|