[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V5 08/12] xen/vm_event: Check for VM_EVENT_FLAG_DUMMY only in Debug builds
On Fri, Feb 13, 2015 at 9:14 PM, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote: > On 13/02/15 16:33, Tamas K Lengyel wrote: >> 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> > > What is the purpose of the dummy flag? I would have thought it would be > more dangerous to accidentally process a dummy response in a non-debug Xen. > > ~Andrew I honestly have no idea what was the real use-case for it. It is a way to signal to Xen to just remove the reponse from the ring without doing anything else with it so I figured it might be handy when debugging a toolstack. Tamas > >> --- >> 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] ) > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |