WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fixes after addition of dummy_vcpu_info.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fixes after addition of dummy_vcpu_info.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 03 Nov 2009 01:45:29 -0800
Delivery-date: Tue, 03 Nov 2009 01:45:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fixes after addition of dummy_vcpu_info., Xen patchbot-unstable <=