From nobody Mon Feb 9 08:29:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584125558; cv=none; d=zohomail.com; s=zohoarc; b=h3N7zCP6/cJOugTeKpwjr3TcRwjKo1geMW4T68bEY9CyTKiUGBliv8N6sgb2/nrKxTPjQ/3saIYVJRKdhdPdJ6sRr42Jx7KkdcNp24CzIq0wlaHu0eIwmmRjzGlDc7y90cFLwECzG8ey2NLgmLfX0VH8pr4yn2xudr4lKDD3VO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584125558; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vTQj/CuraqaEI9qDf4IXecW3ZSVpPZJ56FMzGpZyIT0=; b=APAm6Lxj8tsiuzfbTtDWlTJFaMJXJmBzxEbwh6MSdoii7t8a6soi62Lw1MF1Ct/0gMloBNyo5oF/eOMl/0oXVcVUve7O8QI9iWOgOgRPZU6Y4UppE6577kyF7EPRT4C5Sj6CRRdKDE1UmMDw/XbuMAprWIA+ks2YsMSQ1F6NWus= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584125558362614.4828165870302; Fri, 13 Mar 2020 11:52:38 -0700 (PDT) Received: from localhost ([::1]:35562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCpQD-0001WW-9K for importer@patchew.org; Fri, 13 Mar 2020 14:52:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59132) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCpGC-0001FI-TP for qemu-devel@nongnu.org; Fri, 13 Mar 2020 14:42:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCpGB-0005NV-FC for qemu-devel@nongnu.org; Fri, 13 Mar 2020 14:42:16 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:56964 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 1jCpGB-0005Kq-AA for qemu-devel@nongnu.org; Fri, 13 Mar 2020 14:42:15 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-404-ppCwk4ZMMdSK-DiKQiX2Jg-1; Fri, 13 Mar 2020 14:42:12 -0400 Received: by mail-wr1-f71.google.com with SMTP id j17so4728530wru.19 for ; Fri, 13 Mar 2020 11:42:11 -0700 (PDT) Received: from x1w.redhat.com (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id f207sm19637801wme.9.2020.03.13.11.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 11:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584124933; 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=vTQj/CuraqaEI9qDf4IXecW3ZSVpPZJ56FMzGpZyIT0=; b=B6pBjyLyTEUwJqZQVmOh/3FmoxSD1QxZXx1UXGEPTrvYtk4G5khBGFQsM6gn5+g4L38cLV 9/EJnkRZRKpAQcHQb/Jm+YRdbd2xeEYWQJtMK3E05R2ZEUyrryHYHkTo6Y0rw3k3xOJg5A 0mdtIw1AS45OVW6ne5elf5DhXwyF4+Y= X-MC-Unique: ppCwk4ZMMdSK-DiKQiX2Jg-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=6BA/ayS7bx6RNJ1ANrutCVjpBouFGlBaWUedscA9deQ=; b=GlxSeA3g6vTF2W7jJ+FgZxc+LEYX5ruknH8ba7ku0NmgYu9iSEcWHLSrEO3D1ZyvmV IaqISXHa07pUXF5kQYD6PrbXgDAd8UfgVu+qawQBQrAz0SPJcjd5VZ+kW4s93Wzch7n6 QBKR4L4Ig4HBwAaq/p+N0pATRZ36yqYLTn1wghKjbfBk4LkVVrACi6cg3fdxCjhcWIDZ 7TgGGofTkx2mM63kei3KK4xyZx+pWJftdMkNGEugp7h2phHDNMvn8o7rCVs8Vk3PQZHT cOcdEanymsPWVmmS8PUyHkvtQP3RhkOgYZfgqZhnEtI9OiUV0dFzwd2gvFPuRaPZp7NM F97Q== X-Gm-Message-State: ANhLgQ0PoLE7WXXRP5cKIu8s0k2YH0WiZ04+pFxHRz4dAbx7ee/S6T6e dvIUEiReDB1o3AukVBD3dXVQRVazr8Dqb3FTfeaIx/OYfeDzcB18G3TQjnLfxJfGLTZOyOVt5hy 3YLEyRBSap/7etts= X-Received: by 2002:a5d:4d51:: with SMTP id a17mr1885088wru.285.1584124930482; Fri, 13 Mar 2020 11:42:10 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsPSfJJWGlZeTRLMSIZDbub+F3/I7ELWsUxQYHzbN1CTOauijAugkpIvd3Dl5CCINUMPWZllw== X-Received: by 2002:a5d:4d51:: with SMTP id a17mr1885052wru.285.1584124930178; Fri, 13 Mar 2020 11:42:10 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/9] qapi/misc: Restrict LostTickPolicy enum to machine code Date: Fri, 13 Mar 2020 19:41:47 +0100 Message-Id: <20200313184153.11275-4-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200313184153.11275-1-philmd@redhat.com> References: <20200313184153.11275-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 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: Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Ben Warren , Peter Lieven , "Dr. David Alan Gilbert" , Laurent Vivier , Igor Mammedov , Ronnie Sahlberg , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Reitz , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" 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 de05730704..07ffc07ba2 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -415,6 +415,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 e84e6823e9..f827bdc8f6 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -7,38 +7,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' ] } - ## # @NameInfo: # diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h index 10c93a096a..58a7748c66 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 2047114fca..59380ed761 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 876f5aa6fa..22ba6149b5 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.21.1