WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] The mfn_valid on shadow_set_p2m_entry()

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Keir Fraser" <keir@xxxxxxxxxxxxx>
Subject: [Xen-devel] The mfn_valid on shadow_set_p2m_entry()
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Sat, 6 Jan 2007 01:01:31 +0800
Delivery-date: Fri, 05 Jan 2007 09:03:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Accw6yWMEZu8mjygTF6kmtzSv2bl6g==
Thread-topic: The mfn_valid on shadow_set_p2m_entry()

Noticed that on change set 12568, we change the valid_mfn to be in fact the mfn_valid(). Then on change set 12572, we change the shadow_set_p2m_entry() to use mfn_valid().

Im a bit confused by this change. I think current meaning of mfn_valid() is to check if the mfn is valid RAM. It is ok for page table pages. But for p2m table, considering shadow for driver domain or considering IOMMU in future, would it be possible that the mfn is within MMIO range?

Did I misunderstand anything?

Thanks

Yunhong Jiang

@@ -967,13 +967,13 @@ shadow_set_p2m_entry(struct domain *d, u

     p2m_entry = p2m_find_entry(table, &gfn_remainder, gfn,

                                0, L1_PAGETABLE_ENTRIES);

     ASSERT(p2m_entry);

-    if ( valid_mfn(mfn) )

+    if ( mfn_valid(mfn) )

         *p2m_entry = l1e_from_pfn(mfn_x(mfn), __PAGE_HYPERVISOR|_PAGE_USER);

     else

         *p2m_entry = l1e_empty();

     /* Track the highest gfn for which we have ever had a valid mapping */

-    if ( valid_mfn(mfn) && (gfn > d->arch.max_mapped_pfn) )

+    if ( mfn_valid(mfn) && (gfn > d->arch.max_mapped_pfn) )

         d->arch.max_mapped_pfn = gfn;

     /* The P2M can be shadowed: keep the shadows synced */


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] The mfn_valid on shadow_set_p2m_entry(), Jiang, Yunhong <=