[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] is_mapped() in xc_domain_save()


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Mike Sun" <msun@xxxxxxxxxx>
  • Date: Sat, 27 Sep 2008 23:31:53 -0400
  • Delivery-date: Sat, 27 Sep 2008 20:32:15 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=qBVEqIU0Rrfb3XSY+R1J1iyzflQYEojTWwmknCbKXrVNqqp3hLfF3gQt07RMcJndbV KsWduGUiinv8r/cFEPK6wl1MtNxhunX1MED6jW5VwGEXU6rDRR+9a0rn88s41TqbqC1u eYvb5Fhzmv5npcc4/y0OUVWC02kOLaCsMZP/M=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.