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] [HVM] HVMOP_get_param return parameter va

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] HVMOP_get_param return parameter value within the provided parameter struct,
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 13 Aug 2006 10:10:16 +0000
Delivery-date: Sun, 13 Aug 2006 03:13:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID befab551b0e13c70f11a8b2192e126ab4de47439
# Parent  0340e579f06544431e915d17596ac144145a077e
[HVM] HVMOP_get_param return parameter value within the provided parameter 
struct,
not as a direct return value.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r 0340e579f065 -r befab551b0e1 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Sat Aug 12 16:18:08 2006 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Sun Aug 13 09:44:07 2006 +0100
@@ -568,7 +568,7 @@ long do_hvm_op(unsigned long op, XEN_GUE
         else if ( IS_PRIV(current->domain) )
         {
             d = find_domain_by_id(a.domid);
-            if ( !d )
+            if ( d == NULL )
                 return -ESRCH;
         }
         else
@@ -578,22 +578,24 @@ long do_hvm_op(unsigned long op, XEN_GUE
 
         if ( op == HVMOP_set_param )
         {
+            d->arch.hvm_domain.params[a.index] = a.value;
             rc = 0;
-            d->arch.hvm_domain.params[a.index] = a.value;
         }
         else
         {
-            rc = d->arch.hvm_domain.params[a.index];
+            a.value = d->arch.hvm_domain.params[a.index];
+            rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
         }
 
         put_domain(d);
-        return rc;
+        break;
     }
 
     default:
     {
         DPRINTK("Bad HVM op %ld.\n", op);
         rc = -ENOSYS;
+        break;
     }
     }
 

_______________________________________________
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] [HVM] HVMOP_get_param return parameter value within the provided parameter struct,, Xen patchbot-unstable <=