PPC: Make BookE FIT/WDT timers more lazy

Enterprise / Virtualization / QEMU - Alexander Graf [suse.de] - 25 November 2013 22:35 UTC

Today we fire FIT and WDT timer events every time the respective bit position in TB flips from 0 -> 1.

However, there is no need to do this if the end result would be that we're changing a TSR bit that is set to 1 to 1 again. No guest visible change would have occured.

So whenever we see that the TSR bit to our timer is already set, don't even bother to update the timer that would potentially fire it off.

However, we do need to make sure that we update our timer that notifies us of the TB flip when the respective TSR bit gets unset. In that case we do care about the flip and need to notify the guest again. So add a callback into our timer handlers when TSR bits get unset.

This improves performance for me when the guest is busy processing things.

455df3f PPC: Make BookE FIT/WDT timers more lazy
hw/ppc/ppc_booke.c | 43 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 38 insertions(+), 5 deletions(-)

Upstream: git.qemu.org


  • Share