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-devel

Re: [Xen-devel] [PATCH][RESEND] Fix HV to properly copy runstate info

To: "Glauber de Oliveira Costa" <gcosta@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][RESEND] Fix HV to properly copy runstate info
From: "Glauber de Oliveira Costa" <glommer@xxxxxxxxx>
Date: Mon, 23 Oct 2006 16:43:45 -0300
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 23 Oct 2006 12:44:05 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ceJ3462eYkQmUTy2LLNez/dDRGkhGtjCGiA8lYe2NF5LTnIvsMu9BgToVxekxg95EgAPtbNJIUhVnuz4EB0hY3uKZBJ5N3olsrSpJBdPkrQ8sJMvnOBvgVKgTAdH3lpbQjFvKdW2kHUqFWkTzLpouvXg3qKAKrjyocOni+yY8Nw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061023192915.GA14072@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20061023192915.GA14072@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
just saw a fix for it in changelog ;-)

nevermind.
However, isn't the check for vcpu == current also done inside
vcpu_runstate_get() ?


On 10/23/06, Glauber de Oliveira Costa <gcosta@xxxxxxxxxx> wrote:
Keir,

I guess this patch does the right thing regarding the copy of the
runstate_memory_area without breaking the ABI.

Thanks,

--
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"


--- xen-unstable/xen/arch/x86/domain.c.old      2006-10-04 01:39:48.000000000 
-0300
+++ xen-unstable/xen/arch/x86/domain.c  2006-10-20 15:08:46.000000000 -0300
@@ -376,6 +376,7 @@ arch_do_vcpu_op(
     case VCPUOP_register_runstate_memory_area:
     {
         struct vcpu_register_runstate_memory_area area;
+        struct vcpu_runstate_info runstate;

         rc = -EFAULT;
         if ( copy_from_guest(&area, arg, 1) )
@@ -387,9 +388,9 @@ arch_do_vcpu_op(
         rc = 0;
         v->runstate_guest = area.addr.v;

-        if ( v == current )
-            __copy_to_user(v->runstate_guest, &v->runstate,
-                           sizeof(v->runstate));
+        vcpu_runstate_get(v,&runstate);
+        __copy_to_user(v->runstate_guest, &runstate,
+                       sizeof(runstate));

         break;
     }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel





--
Glauber de Oliveira Costa.
"Free as in Freedom"

Add your comments to GPLv3 at:
http://gplv3.fsf.org/comments/gplv3-draft-2.html

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>