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
53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
Subject: xenpaging: Open paging file only if xenpaging_init() succeeds
|
|
|
|
Open paging file only if xenpaging_init() succeeds. It can fail if the host
|
|
does not support the required virtualization features such as EPT or if
|
|
xenpaging was already started for this domain_id.
|
|
|
|
(xen-unstable changeset: 22435:7818ea9045fd)
|
|
|
|
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
Already-Acked-by: Patrick Colp <pjcolp@cs.ubc.ca>
|
|
Already-Acked-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
---
|
|
tools/xenpaging/xenpaging.c | 18 +++++++++---------
|
|
1 file changed, 9 insertions(+), 9 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
|
|
@@ -496,15 +496,6 @@ int main(int argc, char *argv[])
|
|
|
|
victims = calloc(num_pages, sizeof(xenpaging_victim_t));
|
|
|
|
- /* Open file */
|
|
- sprintf(filename, "page_cache_%d", domain_id);
|
|
- fd = open(filename, open_flags, open_mode);
|
|
- if ( fd < 0 )
|
|
- {
|
|
- perror("failed to open file");
|
|
- return -1;
|
|
- }
|
|
-
|
|
/* Seed random-number generator */
|
|
srand(time(NULL));
|
|
|
|
@@ -516,6 +507,15 @@ int main(int argc, char *argv[])
|
|
goto out;
|
|
}
|
|
|
|
+ /* Open file */
|
|
+ sprintf(filename, "page_cache_%d", domain_id);
|
|
+ fd = open(filename, open_flags, open_mode);
|
|
+ if ( fd < 0 )
|
|
+ {
|
|
+ perror("failed to open file");
|
|
+ return -1;
|
|
+ }
|
|
+
|
|
/* Evict pages */
|
|
memset(victims, 0, sizeof(xenpaging_victim_t) * num_pages);
|
|
for ( i = 0; i < num_pages; i++ )
|