[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5 of 5] Ignore memory events with an obviously invalid gfn
At 10:12 -0500 on 05 Dec (1323079924), Andres Lagar-Cavilla wrote: > xen/arch/x86/mm/mem_sharing.c | 2 ++ > xen/arch/x86/mm/p2m.c | 4 ++++ > xen/include/public/mem_event.h | 7 +++++++ > 3 files changed, 13 insertions(+), 0 deletions(-) > > > Ring semantics require that for every request, a response be put. This > allows consumer to place a dummy response if need be. > > diff -r c71f4c5b42f0 -r 790cd814bee8 xen/include/public/mem_event.h > --- a/xen/include/public/mem_event.h > +++ b/xen/include/public/mem_event.h > @@ -76,6 +76,13 @@ typedef struct mem_event_st { > > DEFINE_RING_TYPES(mem_event, mem_event_request_t, mem_event_response_t); > > +#define INVALID_RSP_GFN -1UL > + On a 32-bit system this doesn't do what you want. Actually, can you use a flag for this, please? Wedging it into the gfn field seems a bit of a hack, and we have plenty of flag bits left. Tim. > +#define DUMMY_MEM_EVENT_RSP(_r) ((_r)->gfn == INVALID_RSP_GFN) > +#define MAKE_MEM_EVENT_RSP_DUMMY(_r) ((_r)->gfn = INVALID_RSP_GFN) > +#define DECLARE_DUMMY_MEM_EVENT_RSP(_name) \ > + mem_event_response_t _name = { .gfn = INVALID_RSP_GFN } > + > #endif > > /* > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |