Fix __gpfn_to_mfn() to work correctly when not executed

in the queried domain's context.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-11-23 13:58:44 +01:00
1 parent 53600718bf
commit b9b24cd1bf
1 file changed
+13 -11
+13 -11
View File
@@ -283,21 +283,23 @@ static inline void shadow_mode_disable(struct domain *d)
/************************************************************************/
#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(
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.