huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) <huang...@chinatelecom.cn> > > Implement dirtyrate calculation periodically basing on > dirty-ring and throttle virtual CPU until it reachs the quota > dirty page rate given by user. > > Introduce qmp commands "set-vcpu-dirty-limit", > "cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit" > to enable, disable, query dirty page limit for virtual CPU. > > Meanwhile, introduce corresponding hmp commands > "set_vcpu_dirty_limit", "cancel_vcpu_dirty_limit", > "info vcpu_dirty_limit" so the feature can be more usable. > > "query-vcpu-dirty-limit" success depends on enabling dirty > page rate limit, so just add it to the list of skipped > command to ensure qmp-cmd-test run successfully. > > Signed-off-by: Hyman Huang(黄勇) <huang...@chinatelecom.cn> > Acked-by: Markus Armbruster <arm...@redhat.com> > Reviewed-by: Peter Xu <pet...@redhat.com> > --- > hmp-commands-info.hx | 13 +++ > hmp-commands.hx | 32 ++++++++ > include/monitor/hmp.h | 3 + > qapi/migration.json | 80 +++++++++++++++++++ > softmmu/dirtylimit.c | 195 > +++++++++++++++++++++++++++++++++++++++++++++ > tests/qtest/qmp-cmd-test.c | 2 + > 6 files changed, 325 insertions(+)
[...] > diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c > index 7f103ea..4b216a0 100644 > --- a/tests/qtest/qmp-cmd-test.c > +++ b/tests/qtest/qmp-cmd-test.c > @@ -110,6 +110,8 @@ static bool query_is_ignored(const char *cmd) > "query-sev-capabilities", > "query-sgx", > "query-sgx-capabilities", > + /* Success depends on enabling dirty page rate limit */ > + "query-vcpu-dirty-limit", > NULL > }; > int i; The new command lacks test coverage. Have you considered writing a test?