From: Gleb Natapov <gleb@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Jan Kiszka <jan.kiszka@web.de>,
Arthur Chunqi Li <yzt356@gmail.com>,
kvm@vger.kernel.org, "Zhang, Yang Z" <yang.z.zhang@intel.com>
Subject: Re: [PATCH v5] KVM: nVMX: Fully support of nested VMX preemption timer
Date: Sun, 29 Sep 2013 14:30:51 +0300 [thread overview]
Message-ID: <20130929113051.GT17294@redhat.com> (raw)
In-Reply-To: <52447335.9090601@redhat.com>
On Thu, Sep 26, 2013 at 07:47:33PM +0200, Paolo Bonzini wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Il 26/09/2013 19:19, Jan Kiszka ha scritto:
> > On 2013-09-26 17:04, Paolo Bonzini wrote:
> >> Il 16/09/2013 10:11, Arthur Chunqi Li ha scritto:
> >>> This patch contains the following two changes:
> >>> 1. Fix the bug in nested preemption timer support. If vmexit L2->L0
> >>> with some reasons not emulated by L1, preemption timer value should
> >>> be save in such exits.
> >>> 2. Add support of "Save VMX-preemption timer value" VM-Exit controls
> >>> to nVMX.
> >>>
> >>> With this patch, nested VMX preemption timer features are fully
> >>> supported.
> >>>
> >>> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
> >>> ---
> >>> ChangeLog to v4:
> >>> Format changes and remove a flag in nested_vmx.
> >>> arch/x86/include/uapi/asm/msr-index.h | 1 +
> >>> arch/x86/kvm/vmx.c | 44 +++++++++++++++++++++++++++++++--
> >>> 2 files changed, 43 insertions(+), 2 deletions(-)
> >>
> >> Hi all,
> >>
> >> the test fails for me if the preemption timer value is set to a value
> >> that is above ~2000 (which means ~65000 TSC cycles on this machine).
> >> The preemption timer seems to count faster than what is expected, for
> >> example only up to 4 million cycles if you set it to one million.
> >> So, I am leaving the patch out of kvm/queue for now, until I can
> >> test it on more processors.
> >
> > So this behaviour is a regression of this patch (and your own version as
> > well)?
>
> Without this patch Arthur's preemption timer test doesn't work at all.
>
Have you ruled out test bugs?
I see things like:
+ int i, j;
...
+ // Consume enough time to let L2->L0->L2 occurs
+ for(i = 0; i < 100000; i++)
+ for (j = 0; j < 10000; j++);
which can be optimized out. Or use of rdtsc() which can be problematic
if host tsc is not synchronised.
--
Gleb.
next prev parent reply other threads:[~2013-09-29 11:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 8:11 [PATCH v5] KVM: nVMX: Fully support of nested VMX preemption timer Arthur Chunqi Li
2013-09-22 7:47 ` Gleb Natapov
2013-09-25 13:58 ` Paolo Bonzini
2013-09-26 15:04 ` Paolo Bonzini
2013-09-26 17:19 ` Jan Kiszka
2013-09-26 17:47 ` Paolo Bonzini
2013-09-26 20:44 ` Paolo Bonzini
2013-09-27 6:37 ` Jan Kiszka
2013-09-29 16:24 ` Jan Kiszka
2013-09-29 11:30 ` Gleb Natapov [this message]
2013-09-30 9:08 ` Jan Kiszka
2013-10-02 18:47 ` Jan Kiszka
2013-10-10 16:12 ` Jan Kiszka
2013-10-10 16:20 ` Paolo Bonzini
2013-10-25 9:56 ` Paolo Bonzini
2013-10-25 9:59 ` Jan Kiszka
2013-10-11 8:17 ` Arthur Chunqi Li
2013-10-03 8:09 ` Paolo Bonzini
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=20130929113051.GT17294@redhat.com \
--to=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yang.z.zhang@intel.com \
--cc=yzt356@gmail.com \
/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).