|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 06/18] xenpaging: allow only one xenpaging binary per
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@xxxxxxxxx>
Already-Acked-by: Patrick Colp <pjcolp@xxxxxxxxx>
Already-Acked-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
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");
+ 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 &&
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 04/18] xenpaging: break endless loop during inital page-out with large pagefiles, (continued)
- [Xen-devel] [PATCH 04/18] xenpaging: break endless loop during inital page-out with large pagefiles, Olaf Hering
- [Xen-devel] [PATCH 02/18] xenpaging: call pageout policy function in xenpaging_evict_page, Olaf Hering
- [Xen-devel] [PATCH 03/18] xenpaging: fix fd leak in xenstore, Olaf Hering
- [Xen-devel] [PATCH 07/18] xenpaging/qemu-dm: add command to flush buffer cache., Olaf Hering
- [Xen-devel] [PATCH 10/18] xenpaging: reduce MINIMUM_RESTART_TIME, Olaf Hering
- [Xen-devel] [PATCH 13/18] xenpaging: increase recently used pages from 4MB to 64MB, Olaf Hering
- [Xen-devel] [PATCH 09/18] xenpaging: populate only paged-out pages, Olaf Hering
- [Xen-devel] [PATCH 12/18] xenpaging: add signal handling, Olaf Hering
- [Xen-devel] [PATCH 14/18] xenpaging: page-in granttable entries, Olaf Hering
- [Xen-devel] [PATCH 11/18] xenpaging: start xenpaging via config option, Olaf Hering
- [Xen-devel] [PATCH 06/18] xenpaging: allow only one xenpaging binary per guest,
Olaf Hering <=
- [Xen-devel] [PATCH 05/18] xenpaging: Open paging file only if xenpaging_init() succeeds, Olaf Hering
- [Xen-devel] [PATCH 15/18] xenpaging: handle dying guest in notify_via_xen_event_channel, Olaf Hering
- [Xen-devel] [PATCH 16/18] xenpaging: prevent page-out of first 16MB, Olaf Hering
- [Xen-devel] [PATCH 17/18] xenpaging: add dynamic startup delay for xenpaging, Olaf Hering
- [Xen-devel] [PATCH 08/18] xenpaging: handle paged-out pages in XENMEM_* commands, Olaf Hering
- [Xen-devel] [PATCH 18/18] xenpaging: random debug statements and partial fixes, Olaf Hering
|
|
|
|
|