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

[Xen-devel] The mfn_valid on shadow_set_p2m_entry()


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Keir Fraser" <keir@xxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • 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

 


Rackspace

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