xen/xenpaging.xenpaging_init.patch
Charles Arnold 9a05aa7fc4 - bnc#658704 - SLES11 SP1 Xen boot panic in x2apic mode
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
2011-01-14 18:24:51 +00:00

57 lines
1.9 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(-)
--- 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:
+ ERROR("Error initialising shared page: %s", strerror(errno));
+ 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 &&