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
61 lines
2.2 KiB
Diff
61 lines
2.2 KiB
Diff
Subject: xenpaging: allow only one xenpaging binary per guest
|
|
|
|
Make sure only one xenpaging binary is active per domain.
|
|
Print info when the host lacks the required features for xenpaging.
|
|
|
|
(xen-unstable changeset: 22436:b153d3b71504)
|
|
(xen-unstable changeset: 22511:fdf95845c2f8)
|
|
|
|
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>
|
|
|
|
---
|
|
v2: use perror for default case
|
|
|
|
tools/xenpaging/xenpaging.c | 12 +++++++++++-
|
|
xen/arch/x86/mm/mem_event.c | 7 +++++++
|
|
2 files changed, 18 insertions(+), 1 deletion(-)
|
|
|
|
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
|
|
@@ -120,7 +120,17 @@ xenpaging_t *xenpaging_init(domid_t doma
|
|
paging->mem_event.ring_page);
|
|
if ( rc != 0 )
|
|
{
|
|
- ERROR("Error initialising shared page");
|
|
+ switch ( errno ) {
|
|
+ case EBUSY:
|
|
+ ERROR("xenpaging is (or was) active on this domain");
|
|
+ break;
|
|
+ case ENODEV:
|
|
+ ERROR("EPT not supported for this guest");
|
|
+ break;
|
|
+ default:
|
|
+ ERROR("Error initialising shared page: %s", strerror(errno));
|
|
+ break;
|
|
+ }
|
|
goto err;
|
|
}
|
|
|
|
Index: xen-4.0.2-testing/xen/arch/x86/mm/mem_event.c
|
|
===================================================================
|
|
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/mem_event.c
|
|
+++ xen-4.0.2-testing/xen/arch/x86/mm/mem_event.c
|
|
@@ -214,6 +214,13 @@ int mem_event_domctl(struct domain *d, x
|
|
mfn_t ring_mfn;
|
|
mfn_t shared_mfn;
|
|
|
|
+ /* Only one xenpaging at a time. If xenpaging crashed,
|
|
+ * the cache is in an undefined state and so is the guest
|
|
+ */
|
|
+ rc = -EBUSY;
|
|
+ if ( d->mem_event.ring_page )
|
|
+ break;
|
|
+
|
|
/* Currently only EPT is supported */
|
|
rc = -ENODEV;
|
|
if ( !(is_hvm_domain(d) && d->arch.hvm_domain.hap_enabled &&
|