From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3Pae-0008DI-6b for qemu-devel@nongnu.org; Fri, 12 Jun 2015 10:05:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3PaZ-0001se-93 for qemu-devel@nongnu.org; Fri, 12 Jun 2015 10:05:48 -0400 Received: from lepton.topquark.net ([168.235.66.66]:34461 helo=Mail2.TopQuark.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3PaZ-0001ry-4u for qemu-devel@nongnu.org; Fri, 12 Jun 2015 10:05:43 -0400 Date: Fri, 12 Jun 2015 10:05:41 -0400 From: Paul Donohue Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH 0/2] qemu-timer/mc146818rtc: fix timer issues related to clock changes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini If the host clock jumps forward or backward without resetting the mc146818rtc's periodic timer, the periodic timer interrupts will either fire rapidly (consuming host CPU and blocking operation of the VM) until the timer catches up to the new host clock, or will stall until the host clock catches up with the prior date used by the periodic timer. A "reset notifier" mechanism was introduced a while back that resets the mc146818rtc's periodic timer if the host clock jumps backward while the VM is running. However, the timer is not reset if the host clock jumps forward while the VM is running, or if the clock jumps either forward or backward when loading a snapshot or migration. In one test case, when loading a 3 week old snapshot, the timer loop consumed CPU and blocked the VM for nearly 90 seconds. The following patches fix this issue by resetting the timer in these cases. Paul Donohue (2): qemu-timer: Call clock reset notifiers on large forward jumps mc146818rtc: Reset the periodic timer on resume from snapshot hw/timer/mc146818rtc.c | 6 ++++++ include/qemu/timer.h | 9 +++++++++ qemu-timer.c | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-)