From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v4] KVM: nVMX: Fully support of nested VMX preemption timer Date: Sat, 14 Sep 2013 09:44:15 +0200 Message-ID: <523413CF.5080203@web.de> References: <1378433091-18233-1-git-send-email-yzt356@gmail.com> <5233481F.8060606@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i5ORNUuNErmvmP3xEqQpXjkIJ9SacMSUB" Cc: Arthur Chunqi Li , kvm@vger.kernel.org, gleb@redhat.com, yang.z.zhang@intel.com To: Paolo Bonzini Return-path: Received: from mout.web.de ([212.227.17.11]:59733 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752692Ab3INHoX (ORCPT ); Sat, 14 Sep 2013 03:44:23 -0400 Received: from mchn199C.mchp.siemens.de ([178.3.179.117]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0MeBPe-1VZf0l2zxm-00PtVP for ; Sat, 14 Sep 2013 09:44:22 +0200 In-Reply-To: <5233481F.8060606@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i5ORNUuNErmvmP3xEqQpXjkIJ9SacMSUB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-09-13 19:15, Paolo Bonzini wrote: > Il 06/09/2013 04:04, Arthur Chunqi Li ha scritto: >> + preempt_val_l1 =3D delta_tsc_l1 >> preempt_scale; >> + if (preempt_val_l2 <=3D preempt_val_l1) >> + preempt_val_l2 =3D 0; >> + else >> + preempt_val_l2 -=3D preempt_val_l1; >> + vmcs_write32(VMX_PREEMPTION_TIMER_VALUE, preempt_val_l2); >=20 > Did you test that a value of 0 triggers an immediate exit, rather than > counting down by 2^32? Perhaps it's safer to limit the value to 1 > instead of 0. To my experience, 0 triggers immediate exists when the preemption timer is enabled. Jan --i5ORNUuNErmvmP3xEqQpXjkIJ9SacMSUB 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/ iEYEARECAAYFAlI0E9IACgkQitSsb3rl5xQrxgCgkVQ2nOLsZhhypkX5/Grzkldi a6MAn3/jHgPu5KUEUrG5lxS7r6FP0djo =XSUM -----END PGP SIGNATURE----- --i5ORNUuNErmvmP3xEqQpXjkIJ9SacMSUB--