Philip,
Jack checked in your prototype change awhile back, but not the modification to query.end. The current code in Kitten only will release a single page on each palacios_free_pages() call. Is that intentional... i.e. the num_pages arg should be ignored? If it should not be ignored, I'll check in the patch below if it looks OK to you.
Kevin
ktpedre@ubuntu:~/src/kitten/arch/x86_64/kernel/palacios$ hg diff
diff -r 3a27e5635d40 arch/x86_64/kernel/palacios/palacios.c
--- a/arch/x86_64/kernel/palacios/palacios.c Wed Jan 19 09:31:59 2011 +0100
+++ b/arch/x86_64/kernel/palacios/palacios.c Thu Feb 03 11:35:50 2011 -0800
@@ -143,9 +143,7 @@
}
/**
- * Frees a page previously allocated via palacios_allocate_page().
- * Note that palacios_allocate_page() can allocate multiple pages with
- * a single call while palacios_free_page() only frees a single page.
+ * Frees pages previously allocated via palacios_allocate_pages().
*/
static void
palacios_free_pages(
@@ -160,7 +158,7 @@
pmem_region_unset_all(&query);
query.start = (uintptr_t) page_paddr;
- query.end = (uintptr_t) page_paddr + PAGE_SIZE;
+ query.end = (uintptr_t) page_paddr + num_pages * PAGE_SIZE;
query.allocated = true;
query.allocated_is_set = true;