The "special pages" for PVH guests include the frames for console and
Xenstore ring buffers. Those have to be marked as "Reserved" in the
guest's E820 map, as otherwise conflicts might arise later e.g. when
hotplugging memory into the guest.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
if (d_config->rdms[i].policy != LIBXL_RDM_RESERVE_POLICY_INVALID)
e820_entries++;
+ /* Add mmio entry for PVH. */
+ if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH)
+ e820_entries++;
/* If we should have a highmem range. */
if (highmem_size)
nr++;
}
+ /* mmio area */
+ if (dom->mmio_size && d_config->b_info.type == LIBXL_DOMAIN_TYPE_PVH) {
+ e820[nr].addr = dom->mmio_start;
+ e820[nr].size = dom->mmio_size;
+ e820[nr].type = E820_RESERVED;
+ nr++;
+ }
+
for (i = 0; i < MAX_ACPI_MODULES; i++) {
if (dom->acpi_modules[i].length) {
e820[nr].addr = dom->acpi_modules[i].guest_addr_out & ~(page_size - 1);