[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fixes after addition of dummy_vcpu_info.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1257154714 0 # Node ID 19f0e0867a1879ce422be21340a79094fb6c1c87 # Parent 059c01d69a0882e9cf428df80a6b300bc6e401d7 Fixes after addition of dummy_vcpu_info. - Clean initialisation of new vcpu_info in map_vcpu_info() if the vcpu was previously using the shared dummy structure. - Don't allow a vcpu to run with teh shared dummy info structure, as no good can come of it. Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- xen/arch/x86/domain.c | 10 +++++++++- xen/common/domain.c | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff -r 059c01d69a08 -r 19f0e0867a18 xen/arch/x86/domain.c --- a/xen/arch/x86/domain.c Thu Oct 29 14:48:28 2009 +0000 +++ b/xen/arch/x86/domain.c Mon Nov 02 09:38:34 2009 +0000 @@ -884,7 +884,15 @@ map_vcpu_info(struct vcpu *v, unsigned l new_info = (vcpu_info_t *)(mapping + offset); - memcpy(new_info, v->vcpu_info, sizeof(*new_info)); + if ( v->vcpu_info == &dummy_vcpu_info ) + { + memset(new_info, 0, sizeof(*new_info)); + __vcpu_info(v, new_info, evtchn_upcall_mask) = 1; + } + else + { + memcpy(new_info, v->vcpu_info, sizeof(*new_info)); + } v->vcpu_info = new_info; v->arch.vcpu_info_mfn = mfn; diff -r 059c01d69a08 -r 19f0e0867a18 xen/common/domain.c --- a/xen/common/domain.c Thu Oct 29 14:48:28 2009 +0000 +++ b/xen/common/domain.c Mon Nov 02 09:38:34 2009 +0000 @@ -757,6 +757,9 @@ long do_vcpu_op(int cmd, int vcpuid, XEN switch ( cmd ) { case VCPUOP_initialise: + if ( v->vcpu_info == &dummy_vcpu_info ) + return -EINVAL; + if ( (ctxt = xmalloc(struct vcpu_guest_context)) == NULL ) return -ENOMEM; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog |
Lists.xenproject.org is hosted with RackSpace, monitoring our |