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] Re: [PATCH 01 of 25] libxc: infrastructure for hypercall

On Tue, 2010-10-26 at 17:38 +0100, Ian Campbell wrote:
> ASAP won't be today now unfortunately. 

Actually, maybe it will:

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1288118755 -3600
# Node ID 630441a717dacd0764836386b63a5db8cd5d11dd
# Parent  cd193fa265b88bf4ff891f03c9be0e12415e6778
libxc: fix xc_version by handling all known command types.

xend was crashing since 22289:ca4a781c8ae8 due to missing handling of
XENVER_commandline.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r cd193fa265b8 -r 630441a717da tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Tue Oct 26 12:22:52 2010 +0100
+++ b/tools/libxc/xc_private.c  Tue Oct 26 19:45:55 2010 +0100
@@ -447,11 +447,14 @@ int xc_version(xc_interface *xch, int cm
 int xc_version(xc_interface *xch, int cmd, void *arg)
 {
     DECLARE_HYPERCALL_BOUNCE(arg, 0, XC_HYPERCALL_BUFFER_BOUNCE_OUT); /* Size 
unknown until cmd decoded */
-    size_t sz = 0;
+    size_t sz;
     int rc;
 
     switch ( cmd )
     {
+    case XENVER_version:
+        sz = 0;
+        break;
     case XENVER_extraversion:
         sz = sizeof(xen_extraversion_t);
         break;
@@ -467,6 +470,21 @@ int xc_version(xc_interface *xch, int cm
     case XENVER_platform_parameters:
         sz = sizeof(xen_platform_parameters_t);
         break;
+    case XENVER_get_features:
+        sz = sizeof(xen_feature_info_t);
+        break;
+    case XENVER_pagesize:
+        sz = 0;
+        break;
+    case XENVER_guest_handle:
+        sz = sizeof(xen_domain_handle_t);
+        break;
+    case XENVER_commandline:
+        sz = sizeof(xen_commandline_t);
+        break;
+    default:
+        ERROR("xc_version: unknown command %d\n", cmd);
+        return -EINVAL;
     }
 
     HYPERCALL_BOUNCE_SET_SIZE(arg, sz);



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

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