>> +void mem_event_vcpu_unpause(struct vcpu *v) {
>> + if ( test_and_clear_bool(v->paused_for_mem_event) )
>
>And now that we consider more than one mem event piling up to pause a
>vcpu, this has to become an atomic counter, which unpauses on zero, and
>takes care of underflow.
Very true. I have seen this event pile up occur in practice in our product.
The problem becomes how to tell apart real event responses that should dec the pause count from spurious crap from the toolstack. IOW, how to not unpause the vcpu when count reaches zero due to bad responses. I think the answer is: you
can't, if the toolstack is evil, behavior undefined and bigger fish to fry.
Would that be a problem? AFAIK, you can have only one mem_event listener for a domain at a time.
Aravindh