From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sh4Ga-00032P-4l for qemu-devel@nongnu.org; Tue, 19 Jun 2012 15:39:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sh4GT-00032b-Is for qemu-devel@nongnu.org; Tue, 19 Jun 2012 15:39:07 -0400 Received: from e24smtp04.br.ibm.com ([32.104.18.25]:52936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sh4GT-000310-7m for qemu-devel@nongnu.org; Tue, 19 Jun 2012 15:39:01 -0400 Received: from /spool/local by e24smtp04.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Jun 2012 16:38:55 -0300 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id F1E121DC0052 for ; Tue, 19 Jun 2012 15:38:52 -0400 (EDT) Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5JJaAfO1826900 for ; Tue, 19 Jun 2012 16:36:10 -0300 Received: from d24av04.br.ibm.com (loopback [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5JHcepq025214 for ; Tue, 19 Jun 2012 14:38:40 -0300 From: =?UTF-8?q?Cr=C3=ADstian=20Viana?= Date: Tue, 19 Jun 2012 16:38:44 -0300 Message-Id: <1340134725-28764-1-git-send-email-vianac@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v4 1/2] Force driftfix=none on previous machines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Development ML Cc: Paolo Bonzini , =?UTF-8?q?Cr=C3=ADstian=20Viana?= , Anthony Liguori , Stefano Stabellini The current value for the -rtc driftfix option is 'none'. This patch makes sure that the old machines configuration will work the same way even after that option changes its default value. Signed-off-by: Crístian Viana --- There's a scenario when things don't work the way I expected: when I set a previous machine with -M, the driftfix flag value on the command line is not used, the machine's default value overwrites it. I'm not sure if that's the expected behavior of QEMU in those cases (if I set a machine, I can't change its properties) or if there's a bug somewhere. This is the question I asked in a previous e-mail (http://article.gmane.org/gmane.comp.emulators.qemu/149902). For example, $ x86_64-softmmu/qemu-x86_64 -M pc-1.0 --rtc driftfix=slew will use "driftfix=none", which is the default for the machine pc-1.0, not "driftfix=slew" as I set on the command line. That only happens if I choose a different machine than the default one (pc-1.1 as of now); otherwise it works fine. Changes since v3: - Rebase the code hw/pc_piix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index d68f77a..ed463da 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -378,6 +378,10 @@ static QEMUMachine pc_machine_v1_1 = { .driver = TYPE_USB_DEVICE,\ .property = "full-path",\ .value = "no",\ + },{\ + .driver = "mc146818rtc",\ + .property = "lost_tick_policy",\ + .value = "discard",\ } static QEMUMachine pc_machine_v1_0 = { -- 1.7.9.5