> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
> On 22/01/2015 09:52, Pavel Dovgalyuk wrote:
> > +    if (replay_mode == REPLAY_MODE_RECORD) {
> > +        replay_save_instructions();
> > +        replay_put_event(EVENT_EXCEPTION);
> > +        return true;
> 
> Missing mutex lock/unlock.

I think not. We just have to write number of already executed instructions.
This number is not linked to exception event. They could be read in replay while
processing some other event.
 
> > @@ -1294,6 +1295,9 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int 
> > interrupt_request)
> >      if (interrupt_request & CPU_INTERRUPT_POLL) {
> >          cs->interrupt_request &= ~CPU_INTERRUPT_POLL;
> >          apic_poll_irq(cpu->apic_state);
> > +        if (replay_mode != REPLAY_MODE_NONE) {
> > +            return true;
> > +        }
> >      }
> >  #endif
> 
> Can you explain this?  It probably needs a comment.

Each function call should process one interrupt at once, because it corresponds 
to single event in the log.

Pavel Dovgalyuk


Reply via email to