On Wed, Dec 10, 2014 at 06:01:21PM +0100, Paolo Bonzini wrote: > > > On 10/12/2014 17:23, Marcelo Tosatti wrote: > > Add machine option and QMP commands to configure TSC deadline > > timer advancement. > > > > Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx> > > > > --- > > monitor.c | 15 ++++++++++ > > qapi-schema.json | 29 +++++++++++++++++++ > > qmp-commands.hx | 48 ++++++++++++++++++++++++++++++++ > > target-i386/kvm.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > vl.c | 4 ++ > > 5 files changed, 176 insertions(+) > > > > Index: qemu.tscdeadline/qapi-schema.json > > =================================================================== > > --- qemu.tscdeadline.orig/qapi-schema.json > > +++ qemu.tscdeadline/qapi-schema.json > > @@ -3515,3 +3515,32 @@ > > # Since: 2.1 > > ## > > { 'command': 'rtc-reset-reinjection' } > > + > > +## > > +# @set-lapic-tscdeadline-advance > > +# > > +# This command sets the TSC deadline timer advancement. > > +# This value will be subtracted from the expiration time > > +# of the high resolution timer which emulates > > +# TSC deadline timer. > > +# > > +# Useful to achieve low timer latencies. > > +# > > +# Only supported by KVM acceleration. > > +# > > +# Since: 2.3 > > +## > > +{ 'command': 'set-lapic-tscdeadline-advance', > > + 'data': { 'advance':'int' } > > +} > > + > > +## > > +# @get-lapic-tscdeadline-advance > > +# > > +# This command gets the TSC deadline timer advancement. > > +# > > +# Only supported by KVM acceleration. > > +# > > +# Since: 2.3 > > +## > > +{ 'command': 'get-lapic-tscdeadline-advance', 'returns': 'int' } > > Please add an object property to the x86 CPU object. It can then be > configured with "-global" on the command line. Don't want to allow individual values for different CPUs. It is a per-VM property. Is it still appropriate to use an object property of the CPU object? > > > + ret = kvm_vm_ioctl(s, KVM_SET_TSCDEADLINE_ADVANCE, &adv); > > + if (ret < 0) { > > + return ret; > > + } > > Please use KVM_GET/SET_ONE_REG instead of introducing a new set of ioctls. > > Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html