mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[HVM] Allow a dom to have nonsense m2p entries when building the p2m
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
This commit is contained in:
1 parent
409d47638a
commit
dc5bf8aa50
1 file changed
+5
@@ -1303,6 +1303,9 @@ shadow_alloc_p2m_table(struct domain *d)
|
||||
if ( !shadow_set_p2m_entry(d, gfn, mfn) )
|
||||
goto error;
|
||||
|
||||
/* Build a p2m map that matches the m2p entries for this domain's
|
||||
* allocated pages. Skip any pages that have an explicitly invalid
|
||||
* or obviously bogus m2p entry. */
|
||||
for ( entry = d->page_list.next;
|
||||
entry != &d->page_list;
|
||||
entry = entry->next )
|
||||
@@ -1318,6 +1321,8 @@ shadow_alloc_p2m_table(struct domain *d)
|
||||
(gfn != 0x55555555L)
|
||||
#endif
|
||||
&& gfn != INVALID_M2P_ENTRY
|
||||
&& (gfn <
|
||||
(RO_MPT_VIRT_END - RO_MPT_VIRT_START) / sizeof (l1_pgentry_t))
|
||||
&& !shadow_set_p2m_entry(d, gfn, mfn) )
|
||||
goto error;
|
||||
}
|
||||
|
||||