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().
I’m 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
|