From: Marcelo Tosatti <mtosatti@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [QEMU patch 2/2] kvm: allow configuration of tsc deadline timer advancement
Date: Wed, 10 Dec 2014 15:04:05 -0200 [thread overview]
Message-ID: <20141210170405.GA19952@amt.cnet> (raw)
In-Reply-To: <54887C61.80008@redhat.com>
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@redhat.com>
> >
> > ---
> > 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
next prev parent reply other threads:[~2014-12-10 17:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 16:23 [Qemu-devel] [QEMU patch 0/2] QEMU lapic tsc deadline advancement Marcelo Tosatti
2014-12-10 16:23 ` [Qemu-devel] [QEMU patch 1/2] kvm: sync kernel headers Marcelo Tosatti
2014-12-10 16:23 ` [Qemu-devel] [QEMU patch 2/2] kvm: allow configuration of tsc deadline timer advancement Marcelo Tosatti
2014-12-10 17:01 ` Paolo Bonzini
2014-12-10 17:04 ` Marcelo Tosatti [this message]
2014-12-10 17:09 ` Paolo Bonzini
2014-12-10 17:27 ` Marcelo Tosatti
2014-12-10 17:29 ` Paolo Bonzini
2014-12-10 17:35 ` Marcelo Tosatti
2014-12-10 17:55 ` Paolo Bonzini
2014-12-10 18:39 ` Radim Krčmář
2014-12-10 18:59 ` Paolo Bonzini
2014-12-10 17:06 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141210170405.GA19952@amt.cnet \
--to=mtosatti@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).