From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIf0y-0004eg-00 for qemu-devel@nongnu.org; Mon, 01 Oct 2012 08:22:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIf0w-0005rH-Pd for qemu-devel@nongnu.org; Mon, 01 Oct 2012 08:22:23 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:59474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIf0w-0005r7-Ie for qemu-devel@nongnu.org; Mon, 01 Oct 2012 08:22:22 -0400 Received: by pbbrp2 with SMTP id rp2so7731995pbb.4 for ; Mon, 01 Oct 2012 05:22:21 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 1 Oct 2012 14:22:05 +0200 Message-Id: <1349094128-32332-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] Fix autotest-exposed RTC bug 1058225 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lookkas@gmail.com > Very easy to reproduce: > > 1) Build the latest qemu.git (we've captured this on internal automated > testing, verified manually), the commit for reference is: > > 14:07:02 INFO | git commit ID is > 6f8fd2530e9a530f237240daf1c981fa5df7f978 (tag v1.2.0-461-g6f8fd25) > > 2) Install a linux guest in it (caught with RHEL 6.2, verified with > Fedora 17) > > 3) In the linux guest, set the hardware clock with hwclock: > > /sbin/hwclock --set --date "2/2/80 03:04:00" > > 4) Verify if hardware clock was set back to the eighties: > > LC_ALL=C /sbin/hwclock > > 5) Observe amazed that hwclock reports a date in the year 2043: > > 14:09:34 INFO | ('hwclock', 'FAIL', 2, "Failed to set hwclock > back to the eighties. Output of hwclock is 'Sun Dec 27 20:35:46 2043 > -0.489664 seconds'") The testcase of patch 1 exposes the bug on an unpatched QEMU. Paolo Paolo Bonzini (3): rtc: fix overflow in mktimegm rtc: map CMOS index 0x37 to 0x32 on read and writes rtc: implement century byte cutils.c | 2 +- hw/mc146818rtc.c | 40 ++++++++++++++++++---------- hw/mc146818rtc_regs.h | 4 +++ tests/rtc-test.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 file modificati, 104 inserzioni(+), 15 rimozioni(-) -- 1.7.12