On 5/2/22 13:54, Markus Armbruster wrote: > Joao Martins <joao.m.martins@xxxxxxxxxx> writes: > >> Expand dirtyrate measurer that is accessible via HMP calc_dirty_rate >> or QMP 'calc-dirty-rate' to receive a @scope argument. The scope >> then restricts the dirty tracking to be done at devices only, >> while neither enabling or using the KVM (CPU) dirty tracker. >> The default stays as is i.e. dirty-ring / dirty-bitmap from KVM. >> >> This is useful to test, exercise the IOMMU dirty tracker and observe >> how much a given device is dirtying memory. >> >> Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx> > > [...] > >> diff --git a/qapi/migration.json b/qapi/migration.json >> index 27d7b281581d..082830c6e771 100644 >> --- a/qapi/migration.json >> +++ b/qapi/migration.json >> @@ -1793,6 +1793,19 @@ >> { 'enum': 'DirtyRateMeasureMode', >> 'data': ['page-sampling', 'dirty-ring', 'dirty-bitmap'] } >> >> +## >> +# @DirtyRateScope: >> +# >> +# An enumeration of scope of measuring dirtyrate. > > "dirtyrate" is not a word. > Indeed. I will be more verbose rather than using 'dirty rate'. >> +# >> +# @dirty-devices: calculate dirtyrate by devices only. > > Please document @all, too. > OK. I probably should have used 'vcpu' and 'devices', rather than 'all' and 'dirty-devices' >> +# >> +# Since: 6.2 >> +# This should be 7.1. >> +## >> +{ 'enum': 'DirtyRateScope', >> + 'data': ['all', 'dirty-devices'] } >> + >> ## >> # @DirtyRateInfo: >> # >> @@ -1827,6 +1840,7 @@ >> 'calc-time': 'int64', >> 'sample-pages': 'uint64', >> 'mode': 'DirtyRateMeasureMode', >> + 'scope': 'DirtyRateScope', > > Please document new member @scope. > OK.