|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] is_mapped() in xc_domain_save()
Hi all,
I think I have a pretty good grasp on domain save/migration code in
xc_domain_save() in Xen 3.2.x, except for the what the is_mapped()
macro is doing in following:
/* Hypercall interfaces operate in PFNs for HVM guests
* and MFNs for PV guests */
if ( hvm )
pfn_type[batch] = n;
else
pfn_type[batch] = pfn_to_mfn(n);
if ( !is_mapped(pfn_type[batch]) )
{
/*
** not currently in psuedo-physical map -- set bit
** in to_fix since we must send this page in last_iter
** unless its sent sooner anyhow, or it never enters
** pseudo-physical map (e.g. for ballooned down doms)
*/
set_bit(n, to_fix);
continue;
}
This chunk of code makes sense for saving PV domains. The is_mapped()
function checks the MSB of the mfn returned by pfn_to_mfn() to make
sure the pfn is actually a part of the pseudo-physical map. And if
it's not, we mark that pfn as to_fix for later in case it later
becomes part of the pseudo-physical map.
But for HVM domains, it doesn't make any sense to me. The is_mapped()
is being called on a pfn, not mfn, and it doesn't seem like it would
ever return false. Is it just a piece of irrelevant code for HVM
domains?
Thanks,
Mike
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] is_mapped() in xc_domain_save(),
Mike Sun <=
|
|
|
|
|