mirror of https://github.com/xemu-project/xemu.git
qapi: Restrict LostTickPolicy enum to machine code
Restricting LostTickPolicy to machine.json pulls slightly less QAPI-generated code into user-mode. Acked-by: Markus Armbruster <armbru@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200913195348.1064154-2-philmd@redhat.com> [Add rationale to commit message] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
b150cb8f67
commit
8dc007d3d9
|
@ -4,6 +4,7 @@
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "hw/pci/pci.h"
|
#include "hw/pci/pci.h"
|
||||||
#include "qapi/qapi-types-block.h"
|
#include "qapi/qapi-types-block.h"
|
||||||
|
#include "qapi/qapi-types-machine.h"
|
||||||
#include "qapi/qapi-types-misc.h"
|
#include "qapi/qapi-types-misc.h"
|
||||||
#include "qapi/qmp/qerror.h"
|
#include "qapi/qmp/qerror.h"
|
||||||
#include "qemu/ctype.h"
|
#include "qemu/ctype.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include <linux/kvm.h>
|
#include <linux/kvm.h>
|
||||||
#include "qapi/qapi-types-misc.h"
|
#include "qapi/qapi-types-machine.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "qemu/timer.h"
|
#include "qemu/timer.h"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#ifndef HW_RTC_MC146818RTC_H
|
#ifndef HW_RTC_MC146818RTC_H
|
||||||
#define 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/queue.h"
|
||||||
#include "qemu/timer.h"
|
#include "qemu/timer.h"
|
||||||
#include "hw/isa/isa.h"
|
#include "hw/isa/isa.h"
|
||||||
|
|
|
@ -402,6 +402,38 @@
|
||||||
##
|
##
|
||||||
{ 'command': 'query-target', 'returns': 'TargetInfo' }
|
{ '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:
|
# @NumaOptionsType:
|
||||||
#
|
#
|
||||||
|
|
|
@ -8,38 +8,6 @@
|
||||||
|
|
||||||
{ 'include': 'common.json' }
|
{ '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:
|
# @add_client:
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue