All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RESEND] Fix HV to properly copy runstate info
@ 2006-10-23 19:29 Glauber de Oliveira Costa
  2006-10-23 19:43 ` Glauber de Oliveira Costa
  0 siblings, 1 reply; 2+ messages in thread
From: Glauber de Oliveira Costa @ 2006-10-23 19:29 UTC (permalink / raw)
  To: xen-devel, Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

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"

[-- Attachment #2: hotplug-stat.patch --]
[-- Type: text/plain, Size: 821 bytes --]

--- 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;
     }

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][RESEND] Fix HV to properly copy runstate info
  2006-10-23 19:29 [PATCH][RESEND] Fix HV to properly copy runstate info Glauber de Oliveira Costa
@ 2006-10-23 19:43 ` Glauber de Oliveira Costa
  0 siblings, 0 replies; 2+ messages in thread
From: Glauber de Oliveira Costa @ 2006-10-23 19:43 UTC (permalink / raw)
  To: Glauber de Oliveira Costa; +Cc: xen-devel

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@redhat.com> 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@lists.xensource.com
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-23 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-23 19:29 [PATCH][RESEND] Fix HV to properly copy runstate info Glauber de Oliveira Costa
2006-10-23 19:43 ` Glauber de Oliveira Costa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.