diff mbox series

[v2,2/8] qapi/misc: Restrict LostTickPolicy enum to machine code

Message ID 20200316000348.29692-3-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series user-mode: Prune build dependencies (part 2) | expand

Commit Message

Philippe Mathieu-Daudé March 16, 2020, 12:03 a.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 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(-)

Comments

Philippe Mathieu-Daudé May 25, 2020, 2:12 p.m. UTC | #1
ping?

On 3/16/20 1:03 AM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  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' }
>  
> +##
> +# @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 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
> +##
> +{ 'enum': 'LostTickPolicy',
> +  'data': ['discard', 'delay', 'slew' ] }
> +
>  ##
>  # @NumaOptionsType:
>  #
> diff --git a/qapi/misc.json b/qapi/misc.json
> index c18fe681fb..2725d835ad 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -7,38 +7,6 @@
>  
>  { 'include': 'common.json' }
>  
> -##
> -# @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 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
> -##
> -{ 'enum': 'LostTickPolicy',
> -  'data': ['discard', 'delay', 'slew' ] }
> -
>  ##
>  # @add_client:
>  #
> 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
>  
> -#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 @@
>  
>  #include "qemu/osdep.h"
>  #include <linux/kvm.h>
> -#include "qapi/qapi-types-misc.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
>  #include "qemu/timer.h"
>
Igor Mammedov May 26, 2020, 3 p.m. UTC | #2
On Mon, 16 Mar 2020 01:03:42 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  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' }
>  
> +##
> +# @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 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
> +##
> +{ 'enum': 'LostTickPolicy',
> +  'data': ['discard', 'delay', 'slew' ] }
> +
>  ##
>  # @NumaOptionsType:
>  #
> diff --git a/qapi/misc.json b/qapi/misc.json
> index c18fe681fb..2725d835ad 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -7,38 +7,6 @@
>  
>  { 'include': 'common.json' }
>  
> -##
> -# @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 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
> -##
> -{ 'enum': 'LostTickPolicy',
> -  'data': ['discard', 'delay', 'slew' ] }
> -
>  ##
>  # @add_client:
>  #
> 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
>  
> -#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 @@
>  
>  #include "qemu/osdep.h"
>  #include <linux/kvm.h>
> -#include "qapi/qapi-types-misc.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
>  #include "qemu/timer.h"
diff mbox series

Patch

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' }
 
+##
+# @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 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
+##
+{ 'enum': 'LostTickPolicy',
+  'data': ['discard', 'delay', 'slew' ] }
+
 ##
 # @NumaOptionsType:
 #
diff --git a/qapi/misc.json b/qapi/misc.json
index c18fe681fb..2725d835ad 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -7,38 +7,6 @@ 
 
 { 'include': 'common.json' }
 
-##
-# @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 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
-##
-{ 'enum': 'LostTickPolicy',
-  'data': ['discard', 'delay', 'slew' ] }
-
 ##
 # @add_client:
 #
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
 
-#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 @@ 
 
 #include "qemu/osdep.h"
 #include <linux/kvm.h>
-#include "qapi/qapi-types-misc.h"
+#include "qapi/qapi-types-machine.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"