From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v5] KVM: nVMX: Fully support of nested VMX preemption timer Date: Fri, 27 Sep 2013 08:37:14 +0200 Message-ID: <5245279A.4090302@web.de> References: <1379319104-10266-1-git-send-email-yzt356@gmail.com> <52444CF6.1020102@redhat.com> <52446C8D.8030000@web.de> <52447335.9090601@redhat.com> <52449CBD.4010603@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="skOJhKkqTxxceo8wNh3JxSrvO9hlnlELu" Cc: Arthur Chunqi Li , kvm@vger.kernel.org, gleb@redhat.com, "Zhang, Yang Z" To: Paolo Bonzini Return-path: Received: from mout.web.de ([212.227.15.4]:62061 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751837Ab3I0GhV (ORCPT ); Fri, 27 Sep 2013 02:37:21 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.58.223]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0LuZgO-1Vq11C3NAm-00zq11 for ; Fri, 27 Sep 2013 08:37:19 +0200 In-Reply-To: <52449CBD.4010603@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --skOJhKkqTxxceo8wNh3JxSrvO9hlnlELu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-09-26 22:44, Paolo Bonzini wrote: > Il 26/09/2013 19:47, Paolo Bonzini ha scritto: >> >> If I only apply this hunk, which disables the preemption timer while >> in L1: >> >> @@ -8396,6 +8375,8 @@ static void nested_vmx_vmexit(struct kvm_vcpu *v= cpu) >> >> load_vmcs12_host_state(vcpu, vmcs12); >> >> + vmcs_write32(PIN_BASED_VM_EXEC_CONTROL, vmx_pin_based_exec_ctr= l(vmx)); >> + >> /* Update TSC_OFFSET if TSC was changed while L2 ran */ >> vmcs_write64(TSC_OFFSET, vmx->nested.vmcs01_tsc_offset); >> >> then the testcase works for somewhat larger values of the preemption t= imer >> (up to ~1500000 TSC cycles), but then fails. Err, does this mean we run L1 with PIN_BASED_VM_EXEC_CONTROL of L2? Ouch. Should be fixed independently. >=20 > I mean if I apply it on top of current kvm/next, without Arthur's patch= =2E >=20 > If I apply the hunk on top of Arthur's patch nothing changes and the > timer testcase starts breaking around ~65000 TSC cycles. So there are several overlapping issues. >=20 > It is a bit problematic that adding printks changes something, so that > the test starts passing. I haven't tried tracepoints yet. Yeah, just convert to trace_printk. >=20 > Jan, which L1 is using the preemption timer? Any reason why you added > it? The one I'm going to present in Edinburgh. Will publish code soon, but it's unspectacular regard preemption timer usage: I'm only using it to enforce immediate exits on next vmentry, i.e. set the timer value to 0. > I wonder if it isn't better to revert it, since it is quite broken. It's in upstream since 3.10, so reverting doesn't buy us anything, we need to fix it anyway for long-term stable. Jan --skOJhKkqTxxceo8wNh3JxSrvO9hlnlELu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJFJ50ACgkQitSsb3rl5xSqVACgwBZ9BmXCGb7/aDkVs4hHd/OG 8ccAoLUMmm3UwCneqclaZ/CpyG6lTPco =CHKM -----END PGP SIGNATURE----- --skOJhKkqTxxceo8wNh3JxSrvO9hlnlELu--