From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [QEMU patch 2/2] kvm: allow configuration of tsc deadline timer advancement Date: Wed, 10 Dec 2014 15:04:05 -0200 Message-ID: <20141210170405.GA19952@amt.cnet> References: <20141210162317.370733848@amt.cnet> <20141210162420.218207164@amt.cnet> <54887C61.80008@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, Luiz Capitulino , Rik van Riel To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33297 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932455AbaLJR3g (ORCPT ); Wed, 10 Dec 2014 12:29:36 -0500 Content-Disposition: inline In-Reply-To: <54887C61.80008@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 > > > > --- > > 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