[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH V5 08/12] xen/vm_event: Check for VM_EVENT_FLAG_DUMMY only in Debug builds



The flag is only used for debugging purposes, thus it should be only checked
for in debug builds of Xen.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxxxxx>
---
 xen/arch/x86/mm/mem_sharing.c | 2 ++
 xen/arch/x86/mm/p2m.c         | 2 ++
 xen/common/mem_access.c       | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 4e5477a..0459544 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -606,8 +606,10 @@ int mem_sharing_sharing_resume(struct domain *d)
             continue;
         }
 
+#ifndef NDEBUG
         if ( rsp.flags & VM_EVENT_FLAG_DUMMY )
             continue;
+#endif
 
         /* Validate the vcpu_id in the response. */
         if ( (rsp.vcpu_id >= d->max_vcpus) || !d->vcpu[rsp.vcpu_id] )
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 5ce852e..68d57d7 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1312,8 +1312,10 @@ void p2m_mem_paging_resume(struct domain *d)
             continue;
         }
 
+#ifndef NDEBUG
         if ( rsp.flags & VM_EVENT_FLAG_DUMMY )
             continue;
+#endif
 
         /* Validate the vcpu_id in the response. */
         if ( (rsp.vcpu_id >= d->max_vcpus) || !d->vcpu[rsp.vcpu_id] )
diff --git a/xen/common/mem_access.c b/xen/common/mem_access.c
index a6d82d1..63f2b52 100644
--- a/xen/common/mem_access.c
+++ b/xen/common/mem_access.c
@@ -44,8 +44,10 @@ void mem_access_resume(struct domain *d)
             continue;
         }
 
+#ifndef NDEBUG
         if ( rsp.flags & VM_EVENT_FLAG_DUMMY )
             continue;
+#endif
 
         /* Validate the vcpu_id in the response. */
         if ( (rsp.vcpu_id >= d->max_vcpus) || !d->vcpu[rsp.vcpu_id] )
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.