|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 03/21] 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>
---
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-unstable.hg-4.1.22433.orig/tools/xenpaging/xenpaging.c
+++ xen-unstable.hg-4.1.22433/tools/xenpaging/xenpaging.c
@@ -123,7 +123,17 @@ xenpaging_t *xenpaging_init(xc_interface
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-unstable.hg-4.1.22433.orig/xen/arch/x86/mm/mem_event.c
+++ xen-unstable.hg-4.1.22433/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 ( !(hap_enabled(d) &&
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 00/21] xenpaging changes for xen-unstable, Olaf Hering
- [Xen-devel] [PATCH 02/21] xenpaging: Open paging file only if xenpaging_init() succeeds, Olaf Hering
- [Xen-devel] [PATCH 04/21] xenpaging: populate paged-out pages unconditionally, Olaf Hering
- [Xen-devel] [PATCH 03/21] xenpaging: allow only one xenpaging binary per guest,
Olaf Hering <=
- [Xen-devel] [PATCH 01/21] xenpaging: break endless loop during inital page-out with large pagefiles, Olaf Hering
- [Xen-devel] [PATCH 07/21] xenpaging: print p2mt for already paged-in pages, Olaf Hering
- [Xen-devel] [PATCH 11/21] xenpaging: optimize p2m_mem_paging_populate, Olaf Hering
- [Xen-devel] [PATCH 13/21] xenpaging: handle temporary out-of-memory conditions during page-in, Olaf Hering
- [Xen-devel] [PATCH 09/21] xenpaging: allow negative num_pages and limit num_pages, Olaf Hering
- [Xen-devel] [PATCH 06/21] xenpaging: print info when free request slots drop below 2, Olaf Hering
- [Xen-devel] [PATCH 12/21] xenpaging: print xenpaging cmdline options, Olaf Hering
- [Xen-devel] [PATCH 08/21] xenpaging: notify policy only on resume, Olaf Hering
- [Xen-devel] [PATCH 14/21] xenpaging: increase recently used pages from 4MB to 64MB, Olaf Hering
- [Xen-devel] [PATCH 05/21] xenpaging: add signal handling, Olaf Hering
|
|
|
|
|