9a05aa7fc4
22707-x2apic-preenabled-check.patch - bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed: Cannot allocate memory" 7434-qemu-rlimit-as.patch - Additional or upstream patches from Jan 22693-fam10-mmio-conf-base-protect.patch 22694-x86_64-no-weak.patch 22708-xenctx-misc.patch 21432-4.0-cpu-boot-failure.patch 22645-amd-flush-filter.patch qemu-fix-7433.patch - Maintain compatibility with the extid flag even though it is deprecated for both legacy and sxp config files. hv_extid_compatibility.patch - bnc#649209-improve suspend eventchn lock suspend_evtchn_lock.patch - Removed the hyper-v shim patches in favor of using the upstream version. - bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed: Cannot allocate memory" qemu-rlimit-as.patch - Upstream c/s 7433 to replace qemu_altgr_more.patch 7433-qemu-altgr.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=90
40 lines
1.3 KiB
Diff
40 lines
1.3 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.
|
|
|
|
(xen-unstable changeset: 22442:1793318b35e6)
|
|
|
|
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
|
|
@@ -514,8 +514,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));
|
|
|
|
@@ -536,6 +534,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;
|