* [Qemu-devel] Deterministic replay
@ 2010-12-22 11:20 Pavel Dovgaluk
2010-12-22 12:35 ` Paul Brook
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Dovgaluk @ 2010-12-22 11:20 UTC (permalink / raw)
To: qemu-devel
Hello.
I am working on implementation of deteministic execution replay technology
for Qemu. It should be similar to VMWare's replay debugging.
To make alarm timer (which invokes host_alarm_handler function)
determinisic, I changed it's behavior: it sets flag, that execution should
be stopped and this flag is checked before every instruction in the
translated code.
To allow breaking the execution in any moment, I added flag check and
exit_tb call before every instruction.
But there is one problem occurred: when I make the same actions like
gen_eob() function, Windows XP cannot load on emulated machine (it reboots
with GPF).
But when I remove two of the actions, everything is OK. These actions are
the following:
if (s->tb->flags & HF_INHIBIT_IRQ_MASK) {
gen_helper_reset_inhibit_irq();
}
if (s->tb->flags & HF_RF_MASK) {
gen_helper_reset_rf();
}
What are these actions for? When I remove any of them the booting process
is OK.
Please help me to understand interrupts mechanism or give links where to
read about it.
I apply my modifications to version 0.12.3 of Qemu. Please refer to it.
Pavel Dovgaluk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Deterministic replay
2010-12-22 11:20 [Qemu-devel] Deterministic replay Pavel Dovgaluk
@ 2010-12-22 12:35 ` Paul Brook
2010-12-22 12:43 ` Pavel Dovgaluk
0 siblings, 1 reply; 3+ messages in thread
From: Paul Brook @ 2010-12-22 12:35 UTC (permalink / raw)
To: qemu-devel; +Cc: Pavel Dovgaluk
> Hello.
>
> I am working on implementation of deteministic execution replay technology
> for Qemu. It should be similar to VMWare's replay debugging.
>
> To make alarm timer (which invokes host_alarm_handler function)
> determinisic, I changed it's behavior: it sets flag, that execution should
> be stopped and this flag is checked before every instruction in the
> translated code.
You don't need to do this. A much better solution is to not use the host timer
at all. See -icount.
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [Qemu-devel] Deterministic replay
2010-12-22 12:35 ` Paul Brook
@ 2010-12-22 12:43 ` Pavel Dovgaluk
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Dovgaluk @ 2010-12-22 12:43 UTC (permalink / raw)
To: 'Paul Brook', qemu-devel
> > I am working on implementation of deteministic execution replay
> technology
> > for Qemu. It should be similar to VMWare's replay debugging.
> >
> > To make alarm timer (which invokes host_alarm_handler function)
> > determinisic, I changed it's behavior: it sets flag, that execution
> should
> > be stopped and this flag is checked before every instruction in the
> > translated code.
>
> You don't need to do this. A much better solution is to not use the
> host timer
> at all. See -icount.
Thank you for your reply.
I know, that there is a virtual timers, that are enabled by -icount option
and can be used to get rid of host timers usage.
But the problem is different - I need to synchronize alarm thread, which
breaks the execution of guest code to allow processing interrupts and
interaction with VNC/GDB/...
Events caused by alarm thread are non-deterministic and asynchronous. To
save these events in the execution log (for latter replay) I need to
synchronize them with execution of guest code.
The way which I am using for it is allowing execution stop at any point of
the guest code.
Pavel Dovgaluk
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-22 12:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-22 11:20 [Qemu-devel] Deterministic replay Pavel Dovgaluk
2010-12-22 12:35 ` Paul Brook
2010-12-22 12:43 ` Pavel Dovgaluk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).