>>> On 23.09.14 at 15:14, <tklengyel@sec.in.tum.de> wrote:
> Relocate p2m_mem_access_resume to common and abstract the new
> p2m_mem_event_emulate_check into the p2m layer to.
>
> Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
> Acked-by: Tim Deegan <tim@xen.org>
> ---
> v8: Abstract p2m_mem_event_emulate_check.
This is a pretty big change compared to the size of this patch, so
retaining the ack wasn't really appropriate. That's even more so
because you didn't even retain previous behavior:
> +void p2m_mem_event_emulate_check(struct domain *d, const mem_event_response_t *rsp)
> +{
> + /* Mark vcpu for skipping one instruction upon rescheduling. */
> + if ( rsp->flags & MEM_EVENT_FLAG_EMULATE )
> + {
> + struct vcpu *v = current;
Compare this with ...
> -void p2m_mem_access_resume(struct domain *d)
> -{
> - mem_event_response_t rsp;
> -
> - /* Pull all responses off the ring */
> - while( mem_event_get_response(d, &d->mem_event->access, &rsp) )
> - {
> - struct vcpu *v;
> -
> - if ( rsp.flags & MEM_EVENT_FLAG_DUMMY )
> - continue;
> -
> - /* Validate the vcpu_id in the response. */
> - if ( (rsp.vcpu_id >= d->max_vcpus) || !d->vcpu[rsp.vcpu_id] )
> - continue;
> -
> - v = d->vcpu[rsp.vcpu_id];
... the original code. I.e. you should pass v instead of d into
p2m_mem_event_emulate_check().
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel