|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH v2 14/14] debug hacks
From: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
xen/common/lu/restore.c | 7 +++++++
xen/common/lu/stream.c | 2 ++
xen/common/page_alloc.c | 6 ++++++
3 files changed, 15 insertions(+)
diff --git a/xen/common/lu/restore.c b/xen/common/lu/restore.c
index 7f40513ef9..fa168bdac1 100644
--- a/xen/common/lu/restore.c
+++ b/xen/common/lu/restore.c
@@ -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");
}
/*
diff --git a/xen/common/lu/stream.c b/xen/common/lu/stream.c
index 52030e8b2e..327c0396ff 100644
--- a/xen/common/lu/stream.c
+++ b/xen/common/lu/stream.c
@@ -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);
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 2a20c12abb..a3668a517f 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -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]) )
{
--
2.21.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |