5a49a4e63b
22045-python27-compat.patch Thu Nov 11 18:44:48 CST 2010 - cyliu@novell.com - bnc#641144 - FV Xen VM running windows or linux cannot write to virtual floppy drive bdrv_default_rwflag.patch - fate#310510 - fix xenpaging xenpaging.optimize_p2m_mem_paging_populate.patch xenpaging.HVMCOPY_gfn_paged_out.patch - bnc#649864 - automatic numa cpu placement of xen conflicts with cpupools 22326-cpu-pools-numa-placement.patch - fate#310510 - fix xenpaging xenpaging.populate_only_if_paged.patch - revert logic, populate needs to happen unconditionally xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch - invalidate current mfn only if gfn is not in flight or done xenpaging.mem_event_check_ring-free_requests.patch - print info only if 1 instead of 2 slots are free xenpaging.guest_remove_page.patch - check mfn before usage in resume function xenpaging.machine_to_phys_mapping.patch - check mfn before usage in resume function - bnc#552115 - Remove target discovery in block-iscsi OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=82
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
Subject: xenpaging: allow negative num_pages and limit num_pages
|
|
|
|
Simplify paging size argument. If a negative number is specified, it
|
|
means the entire guest memory should be paged out. This is useful for
|
|
debugging. Also limit num_pages to the guests max_pages.
|
|
|
|
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
---
|
|
tools/xenpaging/xenpaging.c | 9 +++++++--
|
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
--- xen-4.0.1-testing.orig/tools/xenpaging/xenpaging.c
|
|
+++ xen-4.0.1-testing/tools/xenpaging/xenpaging.c
|
|
@@ -512,8 +512,6 @@ int main(int argc, char *argv[])
|
|
domain_id = atoi(argv[1]);
|
|
num_pages = atoi(argv[2]);
|
|
|
|
- victims = calloc(num_pages, sizeof(xenpaging_victim_t));
|
|
-
|
|
/* Seed random-number generator */
|
|
srand(time(NULL));
|
|
|
|
@@ -534,6 +532,13 @@ int main(int argc, char *argv[])
|
|
return 2;
|
|
}
|
|
|
|
+ if ( num_pages < 0 || num_pages > paging->domain_info->max_pages )
|
|
+ {
|
|
+ num_pages = paging->domain_info->max_pages;
|
|
+ DPRINTF("setting num_pages to %d\n", num_pages);
|
|
+ }
|
|
+ victims = calloc(num_pages, sizeof(xenpaging_victim_t));
|
|
+
|
|
/* ensure that if we get a signal, we'll do cleanup, then exit */
|
|
act.sa_handler = close_handler;
|
|
act.sa_flags = 0;
|