All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: xen-devel@lists.xensource.com, Keir.Fraser@cl.cam.ac.uk
Subject: [PATCH] Fix HV to properly copy runstate info
Date: Fri, 20 Oct 2006 16:23:08 -0300	[thread overview]
Message-ID: <20061020192308.GA8453@redhat.com> (raw)

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

                 reply	other threads:[~2006-10-20 19:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061020192308.GA8453@redhat.com \
    --to=gcosta@redhat.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.