From patchwork Thu Oct 11 12:23:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Artem Pisarenko X-Patchwork-Id: 10636579 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33B4B112B for ; Thu, 11 Oct 2018 12:26:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25CB32B40A for ; Thu, 11 Oct 2018 12:26:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19C482B416; Thu, 11 Oct 2018 12:26:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B85A2B40A for ; Thu, 11 Oct 2018 12:26:10 +0000 (UTC) Received: from localhost ([::1]:34123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAa2b-0005hq-AX for patchwork-qemu-devel@patchwork.kernel.org; Thu, 11 Oct 2018 08:26:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAa1z-0005L3-SM for qemu-devel@nongnu.org; Thu, 11 Oct 2018 08:25:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAa1w-0006Ao-OO for qemu-devel@nongnu.org; Thu, 11 Oct 2018 08:25:31 -0400 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:37366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAa1o-000604-8S for qemu-devel@nongnu.org; Thu, 11 Oct 2018 08:25:23 -0400 Received: by mail-lj1-x241.google.com with SMTP id 63-v6so8044131ljs.4 for ; Thu, 11 Oct 2018 05:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MEOIWNn/0AvqXNVZCXr2eXpkURNpnTf50ZMWQMdxgkI=; b=eL5AnjbSy6GSwEj2dcP0sYeyDg+8Rk4Zfy696Z8ul3v0fm8OL7uuIp27QbajHzwLJz /5WLQv+kGd5vsnlWB4dND+dZ+2BLmqXTKKoeyq3xkskd+wCJeXERqNpcW2e2nBKpS2Dp DCGypmL/gvgrd5WL4Z4nRWgyUQtsk9cLSditrAfe4KWKZcYQ4Wvd0V940OJlOs0p7YT1 4obGrciu7bJ2umSwTvRrvtkTKMpLXGHRymMjv8tMcVXb8M48QSW7U8TMTTsxwFzMPOcZ K/FOUiX9T0McYYTcRXO5Bogv6PXHL5VBhxInbrcnFbLQG92AcY55/lAGIBN5+d4TY0H1 6E6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MEOIWNn/0AvqXNVZCXr2eXpkURNpnTf50ZMWQMdxgkI=; b=iGmDdo+ipMKhh+ktiyyRz+oS4GB7OsKyBYXNUvYtSR3rruM/q/PI2PvmDTMKGcpe6c YRLj7Hs+j4MRainZWkkgMOYqTGT2sCmxeBthohP7jIEP4MAeBL1ipqpsE6P2EsggkejM 4VWPWJLhfc5Lv4YB1kTq8yN5n4a8Rq881GhYrmIUyUUropxpbpIffbc5Az/DcWGuXi5h 9oz5Dh0iO7h1FmYbuMTXaFSYQhoM+/73+Rxm8O4ueBSUD0U5C6+JyuEpTuRmzdboOvha 3lhTa5P0op5b101NS9E2T3EUMOLdeU3i1OBsBH9X9GTYwr9wxXQdJf2yudm9MRlfVe14 OPIQ== X-Gm-Message-State: ABuFfoi6nUOJ/L+xaZbJXkRbWhr/UKzX4x6V1O4ew3shS+RTpnkz64WW w3gDzZKMtpoCg3tooh7r3w6oii/+ X-Google-Smtp-Source: ACcGV63HdHnECXYBlSMUkMggw/YPor8OsHZgLWtILcbL8Z0J6FfZin0DHX6mFzHfGm7v6an5yzBgyQ== X-Received: by 2002:a2e:7608:: with SMTP id r8-v6mr1053372ljc.175.1539260715771; Thu, 11 Oct 2018 05:25:15 -0700 (PDT) Received: from localhost.localdomain ([77.221.221.49]) by smtp.gmail.com with ESMTPSA id 33-v6sm5713890lfu.64.2018.10.11.05.25.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Oct 2018 05:25:14 -0700 (PDT) From: Artem Pisarenko To: qemu-devel@nongnu.org Date: Thu, 11 Oct 2018 18:23:15 +0600 Message-Id: X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::241 Subject: [Qemu-devel] [PATCH 0/4] Fix and improve core RTC function and documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Artem Pisarenko Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Modifications are motivated by bug https://bugs.launchpad.net/qemu/+bug/1797033 I've encountered recently. Trying to fix it and analyzing its effect on all use cases (not covered in bug report) revealed much deeper problems. This is my first patch to QEMU and I'm not sure whether the way I addressed them is proper. They definitely require either modifications to current implementation (breaking compability), or adding clarifications to user documentation. I've tried to find compromise. Changes I propose are driven mostly by my interpretation of user documentation and comments in code, rather than by existing implementation. I've splitted patches in a way that at least some of them may be accepted. Following subsets are make sense on their own: - 1 - 1,2,3 I limited refactoring only to vl.c, although it leads to reworking of all hw/* rtc models which have unreasonable duplications of actions performed by vl.c. I'm sure such kind of rework will reveal more hidden bugs/features, but so far I've had enough (it's a long story how muсh effort and pain cost me to find that tricky bug above). I suppose just to draw attention of relevant hw/* maintainers. Artem Pisarenko (4): vl: improve/fix documentation related to RTC function vl: refactor -rtc option references Fixes RTC bug with base datetime shifts in clock=vm vl,qapi: offset value calculation in RTC_CHANGE event reverted to match behavior before #1797033 bugfix and documented qapi/misc.json | 3 +- qemu-options.hx | 14 +++++--- vl.c | 102 ++++++++++++++++++++++++++++++++++++-------------------- 3 files changed, 76 insertions(+), 43 deletions(-)