Received: from eggs.gnu.org ([208.118.235.92]:37590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaQoZ-0005l3-3U for qemu-devel@nongnu.org; Mon, 19 Nov 2012 07:51:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaQoV-0004Lc-TY for qemu-devel@nongnu.org; Mon, 19 Nov 2012 07:51:02 -0500 Received: from indium.canonical.com ([91.189.90.7]:60267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaQoV-0004LU-O1 for qemu-devel@nongnu.org; Mon, 19 Nov 2012 07:50:59 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TaQoU-00048y-Tx for ; Mon, 19 Nov 2012 12:50:58 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id E12F52E807C for ; Mon, 19 Nov 2012 12:50:58 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 19 Nov 2012 12:42:14 -0000 From: Alex Horn Sender: bounces@canonical.com References: <20121117144135.13758.80176.malonedeb@wampee.canonical.com> Message-Id: <20121119124214.16487.42133.launchpad@loganberry.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1080086] Re: MC146818 RTC breaks when SET bit in Register B is on. Reply-To: Bug 1080086 <1080086@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Attachment added: "register_b_set_flag_v2.patch" https://bugs.launchpad.net/bugs/1080086/+attachment/3438594/+files/regis= ter_b_set_flag_v2.patch -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1080086 Title: MC146818 RTC breaks when SET bit in Register B is on. Status in QEMU: New Bug description: This bug occurs when the SET flag of Register B is enabled. When an RTC data register (i.e. any of the 10 bytes of time/calender data in CMOS) is= set, the data is (as expected) correctly stored in the cmos_data array. Howeve= r, since the SET flag is enabled, the function rtc_set_time is not invoked. As a result, the field base_rtc in RTCState remains uninitialized. This a= ppears to cause a problem on subsequent writes which can end up overwriting data. To see this, consider writing data to Register A after having written data to any of the RTC data registers; the following figure illustrates the call stack for the Register A write operation: +- cmos_io_port_write +-- check_update_timer +---- get_next_alarm +------ rtc_update_time In rtc_update_time, get_guest_rtc calculates the wrong time and overwrites the previously written RTC data register values. I have created a standalone test case which exposes this bug: https://github.com/ahorn/benchmarks/commit/fff1ca40694bbef6f7f9de323bb0be= d63419ef99 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1080086/+subscriptions