BUG_ON(IS_ERR(dom_cow));
/*
- * First 1MB of RAM is historically marked as I/O. If we booted PVH,
- * reclaim the space. Irrespective, leave MFN 0 as special for the sake
- * of 0 being a very common default value. Also reserve the RAM needed by
- * the trampoline on PVH starting at MFN 1.
+ * First 1MB of RAM is historically marked as I/O.
+ * Note that apart from IO Xen also uses the low 1MB to store the AP boot
+ * trampoline and boot information metadata. Due to this always special
+ * case the low 1MB.
*/
BUG_ON(pvh_boot && trampoline_phys != 0x1000);
- for ( i = 0;
- i < (pvh_boot ? (1 + PFN_UP(trampoline_end - trampoline_start))
- : 0x100);
- i++ )
+ for ( i = 0; i < 0x100; i++ )
share_xen_page_with_guest(mfn_to_page(_mfn(i)), dom_io, SHARE_rw);
/* Any areas not specified as RAM by the e820 map are considered I/O. */