On 5/19/19 10:08 PM, Peter Xu wrote: > Expose the new capability via "query-kvm" QMP command too so we know > whether that's turned on on the source VM when we want. > > Signed-off-by: Peter Xu > --- > accel/kvm/kvm-all.c | 5 +++++ > include/sysemu/kvm.h | 2 ++ > qapi/misc.json | 6 +++++- > qmp.c | 1 + > 4 files changed, 13 insertions(+), 1 deletion(-) > > +++ b/qapi/misc.json > @@ -253,9 +253,13 @@ > # > # @present: true if KVM acceleration is built into this executable > # > +# @manual-dirty-log-protect: true if manual dirty log protect is enabled > +# If we want this exposed (and Paolo is right that we might not), it needs '(since 4.1)' designation. > # Since: 0.14.0 > ## > -{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } > +{ 'struct': 'KvmInfo', 'data': > + {'enabled': 'bool', 'present': 'bool', > + 'manual-dirty-log-protect': 'bool' } } > > ## > # @query-kvm: > diff --git a/qmp.c b/qmp.c > index b92d62cd5f..047bef032e 100644 > --- a/qmp.c > +++ b/qmp.c > @@ -73,6 +73,7 @@ KvmInfo *qmp_query_kvm(Error **errp) > > info->enabled = kvm_enabled(); > info->present = kvm_available(); > + info->manual_dirty_log_protect = kvm_manual_dirty_log_protect_enabled(); > > return info; > } > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org