[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xenpaging: allow only one xenpaging binary per guest
# HG changeset patch # User Keir Fraser <keir@xxxxxxx> # Date 1290781021 0 # Node ID b153d3b715049a081732bb2478bff3f6048f75e6 # Parent 7818ea9045fd1aa9dd7ef2e1b6a6281e296ae9d9 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@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(-) diff -r 7818ea9045fd -r b153d3b71504 tools/xenpaging/xenpaging.c --- a/tools/xenpaging/xenpaging.c Fri Nov 26 14:15:59 2010 +0000 +++ b/tools/xenpaging/xenpaging.c Fri Nov 26 14:17:01 2010 +0000 @@ -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; } diff -r 7818ea9045fd -r b153d3b71504 xen/arch/x86/mm/mem_event.c --- a/xen/arch/x86/mm/mem_event.c Fri Nov 26 14:15:59 2010 +0000 +++ b/xen/arch/x86/mm/mem_event.c Fri Nov 26 14:17:01 2010 +0000 @@ -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-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |