[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v5 22/31] timer: introduce new QEMU_CLOCK_VI
From: |
Pavel Dovgaluk |
Subject: |
Re: [Qemu-devel] [RFC PATCH v5 22/31] timer: introduce new QEMU_CLOCK_VIRTUAL_RT clock |
Date: |
Thu, 27 Nov 2014 12:11:21 +0300 |
> From: Paolo Bonzini [mailto:address@hidden
> On 26/11/2014 11:40, Pavel Dovgalyuk wrote:
> > + * @QEMU_CLOCK_VIRTUAL_RT: realtime clock used for icount warp
> > + *
> > + * This clock runs as a realtime clock, but is used for icount warp
> > + * and thus should be traced with record/replay to make warp function
> > + * behave deterministically.
> > */
>
> I think it should also stop/restart across "stop" and "cont" commands,
> similar to QEMU_CLOCK_VIRTUAL. This is as simple as changing
> get_clock() to cpu_get_clock().
>
> This way, QEMU_CLOCK_VIRTUAL_RT is "what QEMU_CLOCK_VIRTUAL does without
> -icount". This makes a lot of sense and can be merged in 2.3
> independent of the rest of the series.
I've updated QEMU to master and started testing changed that you proposed.
And one more problem came out here. The problem is related to patch
60e68042cf70f271308dc6b4b22b609d054af929
It changes x86_cpu_has_work function. And this function instead of just
checking the CPU state changes it:
- return ((cs->interrupt_request & (CPU_INTERRUPT_HARD |
- CPU_INTERRUPT_POLL)) &&
+#if !defined(CONFIG_USER_ONLY)
+ if (cs->interrupt_request & CPU_INTERRUPT_POLL) {
+ apic_poll_irq(cpu->apic_state);
+ cpu_reset_interrupt(cs, CPU_INTERRUPT_POLL);
+ }
+#endif
+
+ return ((cs->interrupt_request & CPU_INTERRUPT_HARD) &&
These changes break the deterministic execution, because cpu_has_work() may be
called at
any moment of the execution.
When POLL interrupt request is processed by x86_cpu_exec_interrupt function, as
it were before,
everything is ok, because I ensure that these calls occur at the same moments
in record/replay.
Pavel Dovgalyuk
[Qemu-devel] [RFC PATCH v5 23/31] cpus: make icount warp deterministic in replay mode, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 24/31] replay: shutdown event, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 25/31] replay: checkpoints, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 26/31] replay: bottom halves, Pavel Dovgalyuk, 2014/11/26
[Qemu-devel] [RFC PATCH v5 27/31] replay: replay aio requests, Pavel Dovgalyuk, 2014/11/26