@@ -31,6 +31,13 @@ void lu_reserve_pages(paddr_t mfns_p, int nr_pages)
}
/* XX: Consume the stream of data and mark all domain pages as allocated too. */
+
+ printk("First live update data page at MFN %lx:\n", mfns[0]);
+ p = mfn_to_virt(mfns[0]);
+ map_pages_to_xen((unsigned long)p, mfns[0], 1, PAGE_HYPERVISOR);
+ for (i = 0; i < 16; i++)
+ printk(" %02x", p[i]);
+ printk("\n");
}
/*
@@ -65,6 +65,7 @@ static int lu_stream_extend(struct lu_stream *stream, int nr_pages)
if (stream->data)
vunmap(stream->data);
stream->data = vmap(stream->pagelist, stream->nr_pages);
+ printk("Mapped %d MFNs at %lx to %p\n", stream->nr_pages, stream->pagelist[0], stream->data);
if (!stream->data)
return -ENOMEM;
@@ -91,6 +92,7 @@ int lu_stream_append(struct lu_stream *stream, void *data, size_t size)
void *p = lu_stream_reserve(stream, size);
if (!p)
return -ENOMEM;
+ printk("Copy %ld starting %02x to %p\n", size, *(unsigned char *)data, p);
memcpy(p, data, size);
lu_stream_end_reservation(stream, size);
@@ -1765,7 +1765,10 @@ static unsigned long contig_avail_pages(struct page_info *pg, unsigned long max_
for ( i = 0 ; i < max_pages; i++)
{
if ( pg[i].count_info & (PGC_broken | PGC_allocated) )
+ {
+ printk("Skipping reserved MFN %lx\n", mfn_x(page_to_mfn(&pg[i])));
break;
+ }
}
return i;
}
@@ -1814,7 +1817,10 @@ static void init_heap_pages(
/* If the (first) page is already marked bad, or allocated in advance
* due to live update, don't add it to the heap. */
if (pg[i].count_info & (PGC_broken | PGC_allocated))
+ {
+ printk("Skipping reserved MFN %lx\n", mfn_x(page_to_mfn(&pg[i])));
continue;
+ }
if ( unlikely(!avail[nid]) )
{
From: David Woodhouse <dwmw@amazon.co.uk> --- xen/common/lu/restore.c | 7 +++++++ xen/common/lu/stream.c | 2 ++ xen/common/page_alloc.c | 6 ++++++ 3 files changed, 15 insertions(+)