This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] is_mapped() in xc_domain_save()
From: "Mike Sun" <msun@xxxxxxxxxx>
Date: Sat, 27 Sep 2008 23:31:53 -0400
Delivery-date: Sat, 27 Sep 2008 20:32:15 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition:x-google-sender-auth; bh=5xOV4QhVuV1LRvfqxjnSDqsBBuIIG6kovSZcKupn1iU=; b=F+0mlbsyPqkH9EFyHVLjauxfzVU073+m/1PaHunM4lEE6s9IPW/wMr629CPUU1rOAY CTz40BEnt9rONNOVvf7PP4XW2/DT+TdX9stCTUoOnhySDC0rtNQ1gUjMEZk/GAVZNYEa RgSlN9pXMoKAK5DvKpfGPsPpXTsCDNt/jZZds=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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;
    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);

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


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>