On 18/06/2020 21:03, Claudio Fontana wrote: > move the vcpu throttling functionality into its own module. > > This functionality is not specific to any accelerator, > and it is used currently by migration to slow down guests to try to > have migrations converge, and by the cocoa MacOS UI to throttle speed. > > cpu-throttle contains the controls to adjust and inspect throttle > settings, start (set) and stop vcpu throttling, and the throttling > function itself that is run periodically on vcpus to make them take a nap. > > Execution of the throttling function on all vcpus is triggered by a timer, > registered at module initialization. > > No functionality change. > > Signed-off-by: Claudio Fontana <cfont...@suse.de> > Reviewed-by: Alex Bennée <alex.ben...@linaro.org> > --- > MAINTAINERS | 1 + > include/hw/core/cpu.h | 37 ------------- > include/qemu/main-loop.h | 5 ++ > include/sysemu/cpu-throttle.h | 68 +++++++++++++++++++++++ > migration/migration.c | 1 + > migration/ram.c | 1 + > softmmu/Makefile.objs | 1 + > softmmu/cpu-throttle.c | 122 > ++++++++++++++++++++++++++++++++++++++++++ > softmmu/cpus.c | 95 +++----------------------------- > 9 files changed, 207 insertions(+), 124 deletions(-) > create mode 100644 include/sysemu/cpu-throttle.h > create mode 100644 softmmu/cpu-throttle.c >
Reviewed-by: Laurent Vivier <lviv...@redhat.com>