From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jt9KB-0007dx-Vs for qemu-devel@nongnu.org; Mon, 05 May 2008 18:38:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jt9K9-0007dY-CU for qemu-devel@nongnu.org; Mon, 05 May 2008 18:38:22 -0400 Received: from [199.232.76.173] (port=47193 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt9K9-0007dV-63 for qemu-devel@nongnu.org; Mon, 05 May 2008 18:38:21 -0400 Received: from py-out-1112.google.com ([64.233.166.179]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jt9K8-00060C-Rr for qemu-devel@nongnu.org; Mon, 05 May 2008 18:38:20 -0400 Received: by py-out-1112.google.com with SMTP id u52so1669624pyb.10 for ; Mon, 05 May 2008 15:38:20 -0700 (PDT) Message-ID: <481F8C55.8080302@codemonkey.ws> Date: Mon, 05 May 2008 17:38:13 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [Patch] [kinda-resend] persistent real-time-clock References: <20080427154501.GA20547@karma.qumranet.com> <4814B0A9.7090601@codemonkey.ws> <20080501084833.GA21769@karma.qumranet.com> <481F6CAF.6060308@codemonkey.ws> <481F7896.1000409@qumranet.com> In-Reply-To: <481F7896.1000409@qumranet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Dan Kenigsberg , qemu-devel@nongnu.org Avi Kivity wrote: > Anthony Liguori wrote: >>> >>> I'm not sure I understood what you suggest here. >>> >>> Plainly storing the rtc state on file is not enough, as unlike with >>> real >>> hardware, nothing will advance it when the power is off. >>> >> >> If you made the CMOS non-volatile, what you would store in the CMOS >> is the clock-offset, not the actual clock time. Then when the VM >> started up again, it would Just Work. >> >> You would probably have to use a different location in CMOS to store >> the offset than what the guest relies on to read the current time. > > Under this, the CMOS would not be read by the guest at any time. So > why store the CMOS at all? Store the offset somewhere and avoid the > CMOS (gaining the ability to work on targets without nonvolatile memory). > > It's config file territory, not CMOS. It's a bios parameter (just like default boot device). It makes sense to allow the bios to let the user customize bios parameters and have that be saved. CMOS is non-volatile in real life so making it non-volatile in QEMU seems like the obvious thing to do. Regards, Anthony Liguori