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] Fix __gpfn_to_mfn() to work correctly when not executed

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix __gpfn_to_mfn() to work correctly when not executed
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Nov 2005 15:16:09 +0000
Delivery-date: Wed, 23 Nov 2005 15:16:41 +0000
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/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 17b98e15bf7821053992246c59701cd4dfd9553f
# Parent  cd6a8d73f5292d4063dee4005c70015f07c7a663
Fix __gpfn_to_mfn() to work correctly when not executed
in the queried domain's context.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r cd6a8d73f529 -r 17b98e15bf78 xen/include/asm-x86/shadow.h
--- a/xen/include/asm-x86/shadow.h      Wed Nov 23 12:54:40 2005
+++ b/xen/include/asm-x86/shadow.h      Wed Nov 23 12:58:44 2005
@@ -283,21 +283,23 @@
 
 /************************************************************************/
 
-#define __mfn_to_gpfn(_d, mfn)                         \
-    ( (shadow_mode_translate(_d))                      \
-      ? get_pfn_from_mfn(mfn)                                   \
+#define __mfn_to_gpfn(_d, mfn)                  \
+    ( (shadow_mode_translate(_d))               \
+      ? get_pfn_from_mfn(mfn)                   \
       : (mfn) )
 
-#define __gpfn_to_mfn(_d, gpfn)                        \
-    ({                                                 \
-        (shadow_mode_translate(_d))                    \
-        ? get_mfn_from_pfn(gpfn)                \
-        : (gpfn);                                      \
+#define __gpfn_to_mfn(_d, gpfn)                 \
+    ({                                          \
+        (shadow_mode_translate(_d))             \
+        ? (((_d) == current->domain) ?          \
+           get_mfn_from_pfn(gpfn) :             \
+           gpfn_to_mfn_foreign((_d), (gpfn)))   \
+        : (gpfn);                               \
     })
 
-#define __gpfn_to_mfn_foreign(_d, gpfn)                \
-    ( (shadow_mode_translate(_d))                      \
-      ? gpfn_to_mfn_foreign(_d, gpfn)                  \
+#define __gpfn_to_mfn_foreign(_d, gpfn)         \
+    ( (shadow_mode_translate(_d))               \
+      ? gpfn_to_mfn_foreign(_d, gpfn)           \
       : (gpfn) )
 
 extern unsigned long gpfn_to_mfn_foreign(

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix __gpfn_to_mfn() to work correctly when not executed, Xen patchbot -unstable <=