From nobody Mon Feb 9 19:52:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599751366; cv=none; d=zohomail.com; s=zohoarc; b=A1m1b8Y5coOvZ9f7Xl2TyfjJ7cq/2Gr4MEPPJwqmCNc7tYmixKEiVykyk/37zqlY3sDU4ylNhDdmJXxFTnAHNmCGogcOOwTtQWKel3/7K1MM18kcBSq06++6oGHfczPoBSJianK+hMeyIKmpHUGXe7OyZTYVLi9wO+uCaTWKLco= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599751366; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=dDjdg4NaV1TOAf05UegZkRDyMykfNBAit7VI0GRtTmU=; b=Gx6T65QwVWHwk6MMC1BIqq8VPnPADuIcFUWtGiYBo7l4EXszQSl+p3vohZeg3z7/2ezyibLdW7MVz76e3zPkHZrVNGdHJxV3MXbSPri5fVz2cVSyeAcxj2scMGA8eQOVTwkFr2eSbZ7oFLseVKjpQktDxccRiV8xL/iJuL0SyXI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1599751366340378.4986240003643; Thu, 10 Sep 2020 08:22:46 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-72-PHeBGuH8Mj-53sii8L3MGQ-1; Thu, 10 Sep 2020 11:22:40 -0400 Received: by mail-wr1-f70.google.com with SMTP id j7so2387359wro.14 for ; Thu, 10 Sep 2020 08:22:40 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id f126sm4113114wmf.13.2020.09.10.08.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599751365; 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: in-reply-to:in-reply-to:references:references; bh=dDjdg4NaV1TOAf05UegZkRDyMykfNBAit7VI0GRtTmU=; b=W7wXZKr4Yxjjv5zV6edaD0cMED7BydM3SAiDktgEjLoNaxP2uZywsxmNbwjg9rMtB0zcM2 w1D8vtBz0X1a0rABK0rxa/uJKgp+zgVjG5DRo2aTihcl1vAHjWk1qfIzFP1RYOZeq26ZYR X30simlyu6+ign1/oz8UdMzOtwygdy0= X-MC-Unique: PHeBGuH8Mj-53sii8L3MGQ-1 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=dDjdg4NaV1TOAf05UegZkRDyMykfNBAit7VI0GRtTmU=; b=Rt74E1y2JPlkaANfKzuL3c5MxBOsdXyIVCiMRXFG9B0mabT/n5UDPsGa/Qk/K5iqvC n0C7VzZxWVbmL3jm9HWlW6UwKAcUb/e0FkiOx2AdDU1qFhtmo4ozsKIZJQRe8VE5+/CC jjYt4+vilH62sHTGo1rQMTUrmEZGDLpV5tqm96nwOYBbrRA9kWzuO/quD+qMKpq6rEOH EclHZ8+EioyUc0VMeyJMAVCqRBV3b+hrI3hUSZtej+uIHNy5VTsXvAi6UCBSV6yn4r1a ghgZjH2plKwqy9CBp1F2xhGupkeL/DYGRv25OpvORggmNrkyZcq40ORaffVOt8aFA9z4 mIrg== X-Gm-Message-State: AOAM5334JEBJtnPdoL4C0SIqa4VMBcPxTgFp7imkXxyw8GskwfKiWeVj c/tTRiGVdmubTDNsREkmVvFkUFNzlLxpesjBzT5gFZGLhLSiZNdyGhkV6QNWJ/vZjVZRjihloLY Orcb77L/T0AT/Qw== X-Received: by 2002:adf:fa02:: with SMTP id m2mr9453781wrr.273.1599751359089; Thu, 10 Sep 2020 08:22:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjT6xwaX7TFu7sPVV/54s64ke7slvt0+SG8CSNkt1Wx2iaFlvuaIonX/DG014nME3Nnz3aTw== X-Received: by 2002:adf:fa02:: with SMTP id m2mr9453757wrr.273.1599751358857; Thu, 10 Sep 2020 08:22:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Ben Warren , "Dr. David Alan Gilbert" , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Richard Henderson , Eric Blake , Peter Lieven , Eduardo Habkost , Igor Mammedov , Ronnie Sahlberg , qemu-block@nongnu.org, Marcel Apfelbaum , Michael Roth , Markus Armbruster , David Hildenbrand , Paolo Bonzini , Kevin Wolf , "Michael S. Tsirkin" , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 2/9] qapi: Restrict LostTickPolicy enum to machine code Date: Thu, 10 Sep 2020 17:22:18 +0200 Message-Id: <20200910152225.524322-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200910152225.524322-1-philmd@redhat.com> References: <20200910152225.524322-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Acked-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qapi/machine.json | 32 ++++++++++++++++++++++++++++++++ qapi/misc.json | 32 -------------------------------- include/hw/rtc/mc146818rtc.h | 2 +- hw/core/qdev-properties.c | 1 + hw/i386/kvm/i8254.c | 2 +- 5 files changed, 35 insertions(+), 34 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 47e9c0b1831..a80933c57be 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -426,6 +426,38 @@ ## { 'command': 'query-target', 'returns': 'TargetInfo' } =20 +## +# @LostTickPolicy: +# +# 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 n= ow +# be behind the time in the host by exactly the amount of time dur= ing +# 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 +## +{ 'enum': 'LostTickPolicy', + 'data': ['discard', 'delay', 'slew' ] } + ## # @NumaOptionsType: # diff --git a/qapi/misc.json b/qapi/misc.json index 8cf6ebe67cb..b21963a176d 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -8,38 +8,6 @@ =20 { 'include': 'common.json' } =20 -## -# @LostTickPolicy: -# -# 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 n= ow -# be behind the time in the host by exactly the amount of time dur= ing -# 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 -## -{ 'enum': 'LostTickPolicy', - 'data': ['discard', 'delay', 'slew' ] } - ## # @add_client: # diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h index 3713181b56f..9cd04f379ac 100644 --- a/include/hw/rtc/mc146818rtc.h +++ b/include/hw/rtc/mc146818rtc.h @@ -9,7 +9,7 @@ #ifndef HW_RTC_MC146818RTC_H #define HW_RTC_MC146818RTC_H =20 -#include "qapi/qapi-types-misc.h" +#include "qapi/qapi-types-machine.h" #include "qemu/queue.h" #include "qemu/timer.h" #include "hw/isa/isa.h" diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 098298c78e6..343c824da04 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -4,6 +4,7 @@ #include "qapi/error.h" #include "hw/pci/pci.h" #include "qapi/qapi-types-block.h" +#include "qapi/qapi-types-machine.h" #include "qapi/qapi-types-misc.h" #include "qapi/qmp/qerror.h" #include "qemu/ctype.h" diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index 876f5aa6fa3..22ba6149b5f 100644 --- a/hw/i386/kvm/i8254.c +++ b/hw/i386/kvm/i8254.c @@ -25,7 +25,7 @@ =20 #include "qemu/osdep.h" #include -#include "qapi/qapi-types-misc.h" +#include "qapi/qapi-types-machine.h" #include "qapi/error.h" #include "qemu/module.h" #include "qemu/timer.h" --=20 2.26.2