|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 14/15] x86/PVH: log Dom0's E820 map earlier
Do this as soon as it's final. For debug builds also mark it final, with
assertions put in place to make sure it won't further be altered. (For a
release build such further altering isn't the end of the world normally,
so the situation is left alone there.)
Switch to using %pd while moving the code up.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -46,6 +46,9 @@
*/
#define HVM_VM86_TSS_SIZE 265
+/* Marker set once Dom0's E820 isn't supposed to change anymore */
+static bool __initdata e820_finalized;
+
static unsigned int __initdata acpi_intr_overrides;
static struct acpi_madt_interrupt_override __initdata *intsrcovr;
@@ -195,6 +198,8 @@ static int __init pvh_steal_ram(struct d
struct e820entry *good = NULL;
unsigned int i = d->arch.nr_e820;
+ ASSERT(!e820_finalized);
+
/*
* Alignment 0 should be set to 1, so it doesn't wrap around in the
* calculations below.
@@ -241,6 +246,8 @@ static int __init pvh_add_mem_range(stru
struct e820entry *map;
unsigned int i;
+ ASSERT(!e820_finalized);
+
for ( i = 0; i < d->arch.nr_e820; i++ )
{
uint64_t rs = d->arch.e820[i].addr;
@@ -1759,6 +1766,13 @@ int __init dom0_construct_pvh(const stru
pvh_place_initrd(bd, &elf, &initrd, &blob_start, &blob_end);
+ if ( opt_dom0_verbose )
+ {
+ printk("%pd memory map:\n", d);
+ print_e820_memory_map(d->arch.e820, d->arch.nr_e820);
+ e820_finalized = true;
+ }
+
rc = pvh_populate_p2m(d, orig_e820, nr_orig_e820,
PFN_DOWN(blob_start), PFN_UP(blob_end));
if ( rc )
@@ -1794,12 +1808,6 @@ int __init dom0_construct_pvh(const stru
if ( rc )
return rc;
- if ( opt_dom0_verbose )
- {
- printk("Dom%u memory map:\n", d->domain_id);
- print_e820_memory_map(d->arch.e820, d->arch.nr_e820);
- }
-
return 0;
}
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |