From patchwork Tue Feb 11 18:37:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrea Bolognani X-Patchwork-Id: 11376675 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 539C7924 for ; Tue, 11 Feb 2020 18:40:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A4C020842 for ; Tue, 11 Feb 2020 18:40:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JVV4/xX3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A4C020842 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:55744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1aSl-0001sX-AV for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Feb 2020 13:40:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36510) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1aQ5-0007uy-0D for qemu-devel@nongnu.org; Tue, 11 Feb 2020 13:38:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1aQ3-0006FF-Cz for qemu-devel@nongnu.org; Tue, 11 Feb 2020 13:38:00 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:20966 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1aQ3-0006Cm-93 for qemu-devel@nongnu.org; Tue, 11 Feb 2020 13:37:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581446278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1FIkEpSl8qkDbHz+wUVRnPVG2Mdsen+3/qcU+l5bVnQ=; b=JVV4/xX3DLZ8Nong22WTAWMyKhXPDa1EeLMo33OXQBge/0rTUq2pSigt2KxaXyzKLKSxP7 uxkNIltGTAVISj8+FhFBE3ccV3z/y5CPG15l4lvL8E6yAvE50/67HXCvc6yQf4TXZGiamL kddvBYrcCq53fgYtQh+Vytl990RhmZs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-ZDF3vHx-OcqPjI_JhZZ_BA-1; Tue, 11 Feb 2020 13:37:49 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F94D13EA for ; Tue, 11 Feb 2020 18:37:48 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A33090069; Tue, 11 Feb 2020 18:37:47 +0000 (UTC) From: Andrea Bolognani To: qemu-devel@nongnu.org Subject: [PATCH] qapi: Expand documentation for LostTickPolicy Date: Tue, 11 Feb 2020 19:37:44 +0100 Message-Id: <20200211183744.210298-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: ZDF3vHx-OcqPjI_JhZZ_BA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Markus Armbruster Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The current documentation is fairly terse and not easy to decode for someone who's not intimately familiar with the inner workings of timer devices. Expand on it by providing a somewhat verbose description of what behavior each policy will result in, as seen from both the guest OS and host point of view. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko Reviewed-by: Andrew Jones --- This information is reported pretty much word by word in https://libvirt.org/formatdomain.html#elementsTime so I'm hoping I can get the QEMU documentation updated and then just merge back the changes. qapi/misc.json | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index 33b94e3589..cd7445d29f 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -163,17 +163,29 @@ ## # @LostTickPolicy: # -# Policy for handling lost ticks in timer devices. -# -# @discard: throw away the missed tick(s) and continue with future injection -# normally. Guest time may be delayed, unless the OS has explicit -# handling of lost ticks -# -# @delay: continue to deliver ticks at the normal rate. Guest time will be -# delayed due to the late tick -# -# @slew: deliver ticks at a higher rate to catch up with the missed tick. The -# guest time should not be delayed once catchup is complete. +# Policy for handling lost ticks in timer devices. Ticks end up getting +# lost when, for example, the guest is paused. +# +# @discard: throw away the missed ticks and continue with future injection +# normally. The guest OS will see the timer jump ahead by a +# potentially quite significant amount all at once, as if the +# intervening chunk of time had simply not existed; needless to +# say, such a sudden jump can easily confuse a guest OS which is +# not specifically prepared to deal with it. Assuming the guest +# OS can deal correctly with the time jump, the time in the guest +# and in the host should now match. +# +# @delay: continue to deliver ticks at the normal rate. The guest OS will +# not notice anything is amiss, as from its point of view time will +# have continued to flow normally. The time in the guest should now +# be behind the time in the host by exactly the amount of time during +# which ticks have been missed. +# +# @slew: deliver ticks at a higher rate to catch up with the missed ticks. +# The guest OS will not notice anything is amiss, as from its point +# of view time will have continued to flow normally. Once the timer +# has managed to catch up with all the missing ticks, the time in +# the guest and in the host should match. # # Since: 2.0 ##