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. > +# > +# @dirty-devices: calculate dirtyrate by devices only. Please document @all, too. > +# > +# Since: 6.2 > +# > +## > +{ '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. > '*vcpu-dirty-rate': [ 'DirtyRateVcpu' ] } } > > ## > @@ -1851,6 +1865,7 @@ > ## > { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64', > '*sample-pages': 'int', > + '*scope': 'DirtyRateScope', > '*mode': 'DirtyRateMeasureMode'} } > > ## [...]