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] tmem: cleanups

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tmem: cleanups
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Jun 2009 00:55:30 -0700
Delivery-date: Fri, 19 Jun 2009 00:59:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1245149229 -3600
# Node ID d96cf4c974d58a82cbaee72820ae3ea637a5ebdb
# Parent  b52a91a45c6590ac5bab155cf60a6542ae57568d
tmem: cleanups

- don't mis-use guest handle for passing an MFN value
- eliminate unnecessary (and misplaced) use of XEN_GUEST_HANDLE_64
- use copy_from_guest() instead of __copy_from_guest() for loading the
  argument structure

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/common/tmem_xen.c      |    5 +----
 xen/include/public/tmem.h  |    3 +--
 xen/include/xen/tmem_xen.h |    4 ++--
 3 files changed, 4 insertions(+), 8 deletions(-)

diff -r b52a91a45c65 -r d96cf4c974d5 xen/common/tmem_xen.c
--- a/xen/common/tmem_xen.c     Tue Jun 16 11:41:31 2009 +0100
+++ b/xen/common/tmem_xen.c     Tue Jun 16 11:47:09 2009 +0100
@@ -87,10 +87,7 @@ static inline void *cli_mfn_to_va(tmem_c
     unsigned long cli_mfn;
     p2m_type_t t;
 
-
-    if (is_pv_32on64_vcpu(current))
-        cmfn.p = (void *)((unsigned long)cmfn.p & 0xffffffffUL);
-    cli_mfn = mfn_x(gfn_to_mfn(current->domain,(unsigned long)cmfn.p,&t));
+    cli_mfn = mfn_x(gfn_to_mfn(current->domain, cmfn, &t));
     if (t != p2m_ram_rw)
         return NULL;
     if (pcli_mfn != NULL)
diff -r b52a91a45c65 -r d96cf4c974d5 xen/include/public/tmem.h
--- a/xen/include/public/tmem.h Tue Jun 16 11:41:31 2009 +0100
+++ b/xen/include/public/tmem.h Tue Jun 16 11:47:09 2009 +0100
@@ -66,7 +66,7 @@
 
 
 #ifndef __ASSEMBLY__
-typedef XEN_GUEST_HANDLE(void) tmem_cli_mfn_t;
+typedef xen_pfn_t tmem_cli_mfn_t;
 typedef XEN_GUEST_HANDLE(char) tmem_cli_va_t;
 struct tmem_op {
     uint32_t cmd;
@@ -95,7 +95,6 @@ struct tmem_op {
 };
 typedef struct tmem_op tmem_op_t;
 DEFINE_XEN_GUEST_HANDLE(tmem_op_t);
-typedef XEN_GUEST_HANDLE_64(tmem_op_t) tmem_cli_op_t;
 
 #endif
 
diff -r b52a91a45c65 -r d96cf4c974d5 xen/include/xen/tmem_xen.h
--- a/xen/include/xen/tmem_xen.h        Tue Jun 16 11:41:31 2009 +0100
+++ b/xen/include/xen/tmem_xen.h        Tue Jun 16 11:47:09 2009 +0100
@@ -281,12 +281,12 @@ static inline bool_t tmh_current_is_priv
 /* these typedefs are in the public/tmem.h interface
 typedef XEN_GUEST_HANDLE(void) cli_mfn_t;
 typedef XEN_GUEST_HANDLE(char) cli_va_t;
-typedef XEN_GUEST_HANDLE(tmem_op_t) cli_tmemop_t;
 */
+typedef XEN_GUEST_HANDLE(tmem_op_t) tmem_cli_op_t;
 
 static inline int tmh_get_tmemop_from_client(tmem_op_t *op, tmem_cli_op_t uops)
 {
-    return __copy_from_guest(op, uops, 1);
+    return copy_from_guest(op, uops, 1);
 }
 
 static inline void tmh_copy_to_client_buf_offset(tmem_cli_va_t clibuf, int off,

_______________________________________________
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] tmem: cleanups, Xen patchbot-unstable <=