From: Olaf Hering Subject: Re: [PATCH v3] x86/time: Don't use virtual TSC if host and guest frequencies are equal Date: Tue, 28 Mar 2017 15:40:20 +0200 Message-ID: <20170328154020.176f5b82.olaf@aepfle.de> References: <1489774526-9424-1-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0335792980192082761==" Return-path: In-Reply-To: <1489774526-9424-1-git-send-email-boris.ostrovsky@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Boris Ostrovsky Cc: andrew.cooper3@citrix.com, jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============0335792980192082761== Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/gT3mm6dbirYcBf9A54SuIGt"; protocol="application/pgp-signature" --Sig_/gT3mm6dbirYcBf9A54SuIGt Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Fri, 17 Mar 2017 14:15:26 -0400 schrieb Boris Ostrovsky : > Commit 82713ec8d2 ("x86: use native RDTSC(P) execution when guest and > host frequencies are the same") left out optimization for PV guests > when host and guest run at the same frequency. >=20 > For such a case we should be able not to use virtual TSC regardless > of whether we are runing before or after a migration (i.e. regardless > of incarnation value). I think this part of tscmode.txt may needs an update now. Doesn't the "always emulated for PV" meant the part which was changed? ... The default mode (tsc_mode=3D=3D0) checks TSC-safeness of the underlying hardware on which the virtual machine is launched. If it is TSC-safe, rdtsc will execute at hardware speed; if it is not, rdtsc will be emulated. Once a virtual machine is save/restored or migrated, however, there are two possibilities: For a paravirtualized (PV) domain, TSC will always be emulated. For a fully-virtualized (HVM) domain, TSC remains native IF the source physical machine and target physical machi= ne have the same TSC frequency; else TSC is emulated. Note that, though emulated, the "apparent" TSC frequency will be the TSC frequency of the initial physical machine, even after migration. ... Olaf --Sig_/gT3mm6dbirYcBf9A54SuIGt Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSkRyP6Rn//f03pRUBdQqD6ppg2fgUCWNpnxAAKCRBdQqD6ppg2 fgJ2AKCambMBfsrY2+CaH3yPtCXG+OAcSgCg09/W/QAnHEr5hh5av39q9NQxaZM= =r7Tt -----END PGP SIGNATURE----- --Sig_/gT3mm6dbirYcBf9A54SuIGt-- --===============0335792980192082761== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============0335792980192082761==--