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

[XenPPC] [linux-ppc-2.6] [LINUX][POWERPC] Update domctl and sysctl defin

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [LINUX][POWERPC] Update domctl and sysctl definitions.
From: Xen patchbot-linux-ppc-2.6 <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Sep 2006 16:23:41 +0000
Delivery-date: Mon, 18 Sep 2006 09:27:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User hollisb@localhost
# Node ID 10243a857f5d0babad227219c79e45b9131fb9f3
# Parent  4a1f58739bc25b80eae92af80b9ef309cb25468c
[LINUX][POWERPC] Update domctl and sysctl definitions.
- changes the interface versions.
- added KERN_WARNING messages to help debug version mismatches.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 arch/powerpc/platforms/xen/hcall.c |   15 ++++++++++++---
 include/xen/interface/domctl.h     |   22 +++++++++++-----------
 include/xen/interface/sysctl.h     |   20 ++++++++++----------
 3 files changed, 33 insertions(+), 24 deletions(-)

diff -r 4a1f58739bc2 -r 10243a857f5d arch/powerpc/platforms/xen/hcall.c
--- a/arch/powerpc/platforms/xen/hcall.c        Tue Sep 12 15:53:01 2006 -0500
+++ b/arch/powerpc/platforms/xen/hcall.c        Mon Sep 18 11:12:12 2006 -0500
@@ -237,8 +237,11 @@ static int xenppc_privcmd_domctl(privcmd
        if (copy_from_user(&kern_op, user_op, sizeof(xen_domctl_t)))
                return -EFAULT;
 
-       if (kern_op.interface_version != XEN_DOMCTL_INTERFACE_VERSION)
+       if (kern_op.interface_version != XEN_DOMCTL_INTERFACE_VERSION) {
+               printk(KERN_WARNING "%s: %s %x != %x\n", __func__, 
current->comm,
+                               kern_op.interface_version, 
XEN_DOMCTL_INTERFACE_VERSION);
                return -EACCES;
+       }
 
        ret = xencomm_create(&kern_op, sizeof(xen_domctl_t), &op_desc, 
GFP_KERNEL);
        if (ret)
@@ -348,8 +351,11 @@ static int xenppc_privcmd_sysctl(privcmd
        if (copy_from_user(&kern_op, user_op, sizeof(xen_sysctl_t)))
                return -EFAULT;
 
-       if (kern_op.interface_version != XEN_SYSCTL_INTERFACE_VERSION)
+       if (kern_op.interface_version != XEN_SYSCTL_INTERFACE_VERSION) {
+               printk(KERN_WARNING "%s: %s %x != %x\n", __func__, 
current->comm,
+                               kern_op.interface_version, 
XEN_SYSCTL_INTERFACE_VERSION);
                return -EACCES;
+       }
 
        ret = xencomm_create(&kern_op, sizeof(xen_sysctl_t), &op_desc, 
GFP_KERNEL);
        if (ret)
@@ -413,8 +419,11 @@ static int xenppc_privcmd_platform_op(pr
        if (copy_from_user(&kern_op, user_op, sizeof(xen_platform_op_t)))
                return -EFAULT;
 
-       if (kern_op.interface_version != XENPF_INTERFACE_VERSION)
+       if (kern_op.interface_version != XENPF_INTERFACE_VERSION) {
+               printk(KERN_WARNING "%s: %s %x != %x\n", __func__, 
current->comm,
+                               kern_op.interface_version, 
XENPF_INTERFACE_VERSION);
                return -EACCES;
+       }
 
        ret = xencomm_create(&kern_op, sizeof(xen_platform_op_t), &op_desc,
                        GFP_KERNEL);
diff -r 4a1f58739bc2 -r 10243a857f5d include/xen/interface/domctl.h
--- a/include/xen/interface/domctl.h    Tue Sep 12 15:53:01 2006 -0500
+++ b/include/xen/interface/domctl.h    Mon Sep 18 11:12:12 2006 -0500
@@ -10,14 +10,16 @@
 #ifndef __XEN_PUBLIC_DOMCTL_H__
 #define __XEN_PUBLIC_DOMCTL_H__
 
+#if !defined(__XEN__) && !defined(__XEN_TOOLS__)
+#error "domctl operations are intended for use by node control tools only"
+#endif
+
 #include "xen.h"
 
-#define XEN_DOMCTL_INTERFACE_VERSION 0x00000002
-
-#define uint64_t uint64_aligned_t
+#define XEN_DOMCTL_INTERFACE_VERSION 0x00000003
 
 struct xenctl_cpumap {
-    XEN_GUEST_HANDLE_64(uint8_t) bitmap;
+    XEN_GUEST_HANDLE(uint8_t) bitmap;
     uint32_t nr_cpus;
 };
 
@@ -72,7 +74,7 @@ struct xen_domctl_getmemlist {
     uint64_t max_pfns;
     /* Start index in guest's page list. */
     uint64_t start_pfn;
-    XEN_GUEST_HANDLE_64(xen_pfn_t) buffer;
+    XEN_GUEST_HANDLE(xen_pfn_t) buffer;
     /* OUT variables. */
     uint64_t num_pfns;
 };
@@ -109,7 +111,7 @@ struct xen_domctl_getpageframeinfo2 {
     /* IN variables. */
     uint64_t num;
     /* IN/OUT variables. */
-    XEN_GUEST_HANDLE_64(ulong) array;
+    XEN_GUEST_HANDLE(ulong) array;
 };
 typedef struct xen_domctl_getpageframeinfo2 xen_domctl_getpageframeinfo2_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo2_t);
@@ -183,7 +185,7 @@ struct xen_domctl_shadow_op {
     uint32_t       mb;       /* Shadow memory allocation in MB */
 
     /* OP_PEEK / OP_CLEAN */
-    XEN_GUEST_HANDLE_64(ulong) dirty_bitmap;
+    XEN_GUEST_HANDLE(ulong) dirty_bitmap;
     uint64_t       pages;    /* Size of buffer. Updated with actual size. */
     struct xen_domctl_shadow_op_stats stats;
 };
@@ -203,8 +205,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_m
 #define XEN_DOMCTL_setvcpucontext    12
 #define XEN_DOMCTL_getvcpucontext    13
 struct xen_domctl_vcpucontext {
-    uint32_t              vcpu;                     /* IN */
-    XEN_GUEST_HANDLE_64(vcpu_guest_context_t) ctxt; /* IN/OUT */
+    uint32_t              vcpu;                  /* IN */
+    XEN_GUEST_HANDLE(vcpu_guest_context_t) ctxt; /* IN/OUT */
 };
 typedef struct xen_domctl_vcpucontext xen_domctl_vcpucontext_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpucontext_t);
@@ -385,8 +387,6 @@ typedef struct xen_domctl xen_domctl_t;
 typedef struct xen_domctl xen_domctl_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_t);
 
-#undef uint64_t
-
 #endif /* __XEN_PUBLIC_DOMCTL_H__ */
 
 /*
diff -r 4a1f58739bc2 -r 10243a857f5d include/xen/interface/sysctl.h
--- a/include/xen/interface/sysctl.h    Tue Sep 12 15:53:01 2006 -0500
+++ b/include/xen/interface/sysctl.h    Mon Sep 18 11:12:12 2006 -0500
@@ -9,12 +9,14 @@
 #ifndef __XEN_PUBLIC_SYSCTL_H__
 #define __XEN_PUBLIC_SYSCTL_H__
 
+#if !defined(__XEN__) && !defined(__XEN_TOOLS__)
+#error "sysctl operations are intended for use by node control tools only"
+#endif
+
 #include "xen.h"
 #include "domctl.h"
 
-#define XEN_SYSCTL_INTERFACE_VERSION 0x00000001
-
-#define uint64_t uint64_aligned_t
+#define XEN_SYSCTL_INTERFACE_VERSION 0x00000002
 
 /*
  * Read console content from Xen buffer ring.
@@ -22,8 +24,8 @@
 #define XEN_SYSCTL_readconsole       1
 struct xen_sysctl_readconsole {
     /* IN variables. */
-    uint32_t clear;                   /* Non-zero -> clear after reading. */
-    XEN_GUEST_HANDLE_64(char) buffer; /* Buffer start */
+    uint32_t clear;                /* Non-zero -> clear after reading. */
+    XEN_GUEST_HANDLE(char) buffer; /* Buffer start */
     /* IN/OUT variables. */
     uint32_t count;            /* In: Buffer size;  Out: Used buffer size  */
 };
@@ -101,9 +103,9 @@ struct xen_sysctl_perfc_op {
     uint32_t       nr_counters;       /*  number of counters description  */
     uint32_t       nr_vals;                      /*  number of values  */
     /* counter information (or NULL) */
-    XEN_GUEST_HANDLE_64(xen_sysctl_perfc_desc_t) desc;
+    XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc;
     /* counter values (or NULL) */
-    XEN_GUEST_HANDLE_64(xen_sysctl_perfc_val_t) val;
+    XEN_GUEST_HANDLE(xen_sysctl_perfc_val_t) val;
 };
 typedef struct xen_sysctl_perfc_op xen_sysctl_perfc_op_t;
 DEFINE_XEN_GUEST_HANDLE(xen_sysctl_perfc_op_t);
@@ -113,7 +115,7 @@ struct xen_sysctl_getdomaininfolist {
     /* IN variables. */
     domid_t               first_domain;
     uint32_t              max_domains;
-    XEN_GUEST_HANDLE_64(xen_domctl_getdomaininfo_t) buffer;
+    XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t) buffer;
     /* OUT variables. */
     uint32_t              num_domains;
 };
@@ -136,8 +138,6 @@ typedef struct xen_sysctl xen_sysctl_t;
 typedef struct xen_sysctl xen_sysctl_t;
 DEFINE_XEN_GUEST_HANDLE(xen_sysctl_t);
 
-#undef uint64_t
-
 #endif /* __XEN_PUBLIC_SYSCTL_H__ */
 
 /*

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [linux-ppc-2.6] [LINUX][POWERPC] Update domctl and sysctl definitions., Xen patchbot-linux-ppc-2 . 6 <=