08a77ed8c4
xenpaging.tools_xenpaging_cleanup.patch - fate#310510 - fix xenpaging xenpaging.mem_event_check_ring-free_requests.patch - install /etc/xen/examples/xentrace_formats.txt to get human readable tracedata if xenalyze is not used - fate#310510 - fix xenpaging xenpaging.autostart_delay.patch xenpaging.blacklist.patch xenpaging.MRU_SIZE.patch remove xenpaging.hacks.patch, realmode works - Upstream patches from Jan including fixes for the following bugs bnc#583568 - Xen kernel is not booting bnc#615206 - Xen kernel fails to boot with IO-APIC problem bnc#640773 - Xen kernel crashing right after grub bnc#643477 - issues with PCI hotplug/hotunplug to Xen driver domain 22223-vtd-igd-workaround.patch 22222-x86-timer-extint.patch 22214-x86-msr-misc-enable.patch 22213-x86-xsave-cpuid-check.patch 22194-tmem-check-pv-mfn.patch 22177-i386-irq-safe-map_domain_page.patch 22175-x86-irq-enter-exit.patch 22174-x86-pmtimer-accuracy.patch 22160-Intel-C6-EOI.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=76
54 lines
1.8 KiB
Diff
54 lines
1.8 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.
|
|
|
|
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(-)
|
|
|
|
--- xen-4.0.1-testing.orig/tools/xenpaging/xenpaging.c
|
|
+++ xen-4.0.1-testing/tools/xenpaging/xenpaging.c
|
|
@@ -119,7 +119,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:
|
|
+ perror("Error initialising shared page");
|
|
+ break;
|
|
+ }
|
|
goto err;
|
|
}
|
|
|
|
--- xen-4.0.1-testing.orig/xen/arch/x86/mm/mem_event.c
|
|
+++ xen-4.0.1-testing/xen/arch/x86/mm/mem_event.c
|
|
@@ -226,6 +226,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.enabled )
|
|
+ break;
|
|
+
|
|
/* Currently only EPT is supported */
|
|
rc = -ENODEV;
|
|
if ( !(is_hvm_domain(d) && d->arch.hvm_domain.hap_enabled &&
|