x86/p2m: restrict auditing to debug builds
authorJan Beulich <jbeulich@suse.com>
Fri, 13 Dec 2013 14:06:11 +0000 (15:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 13 Dec 2013 14:06:11 +0000 (15:06 +0100)
... since iterating through all of a guest's pages may take unduly
long.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/include/asm-x86/p2m.h

index 43583b205c9fcfeea0b5b7c75c4f5eeceb479036..f4e7253da1fcc496ac1a921cc116a13002e40af9 100644 (file)
@@ -600,7 +600,11 @@ int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 extern void p2m_pt_init(struct p2m_domain *p2m);
 
 /* Debugging and auditing of the P2M code? */
+#ifndef NDEBUG
 #define P2M_AUDIT     1
+#else
+#define P2M_AUDIT     0
+#endif
 #define P2M_DEBUGGING 0
 
 #if P2M_AUDIT