0c76f22ef1
- bnc#633573 - System fail to boot after running several warm reboot tests 22749-vtd-workarounds.patch - Upstream patches from Jan 22744-ept-pod-locking.patch 22777-vtd-ats-fixes.patch 22781-pod-hap-logdirty.patch 22782-x86-emul-smsw.patch 22789-i386-no-x2apic.patch 22790-svm-resume-migrate-pirqs.patch 22816-x86-pirq-drop-priv-check.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=94
42 lines
1.4 KiB
Diff
42 lines
1.4 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(-)
|
|
|
|
Index: xen-4.0.2-testing/tools/xenpaging/xenpaging.c
|
|
===================================================================
|
|
--- xen-4.0.2-testing.orig/tools/xenpaging/xenpaging.c
|
|
+++ xen-4.0.2-testing/tools/xenpaging/xenpaging.c
|
|
@@ -515,8 +515,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));
|
|
|
|
@@ -537,6 +535,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;
|