qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Bottom halves VS timers


From: Pavel Dovgalyuk
Subject: [Qemu-devel] Bottom halves VS timers
Date: Tue, 22 Jan 2019 10:15:03 +0300

Hi!

 

I recently debugged record/replay for some platform which uses PIO access for 
IDE.

Handlers for these operations are called through BHs.

Scheduling new BH does not create a signal for the vCPU to suspend the 
execution and

process the main loop events (in record/replay we synchronize these two 
threads).

Therefore vCPU may execute 10000000 instruction until BH processing and the 
guest

software may get a timeout.

 

I thought about replacing BH to the timers with period=0. This solution has the 
following
properties:

1.       Avoid code duplication (BH and timers do virtually the same operations)

2.       Timers affect the vCPU - adding new virtual timer suspends the 
execution to process the
callback

3.       Timers are deterministic in record/replay mode (virtual ones of 
course). We have similar
deterministic concept for BHs, but selecting between virtual and realtime 
should be more familiar
for other developers.

4.       Timers require a little bit more code, but this could be solved with 
better interfaces

 

What do you think about this?

Did I miss anything?

 

Pavel Dovgalyuk

 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]