|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Fix __gpfn_to_mfn() to work correctly when not executed
# 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 <=
|
|
|
|
|