From: Dan Magenheimer Subject: RE: Re: [PATCH] x86: unconditionally mark TSC unstable under Xen Date: Thu, 15 Jul 2010 10:14:54 -0700 (PDT) Message-ID: <70bac91d-227c-452f-bf20-a03a86d02255@default> References: <51C8308F-F413-47AF-8845-C92BD36CA35C@linode.com> <4C3E2DCC.1010201@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4C3F3B0F.1040107@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge , Jed Smith Cc: xen-devel@lists.xensource.com, Jan Beulich , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org > > Isn't the real problem that, in a PV guest, the cpuid instructions > > that are testing the TSC-related CPUID bits are obtaining the actual > > hardware value, rather than what Xen would like the guest to believe? >=20 > No, because there shouldn't be any "naked" rdtscs in the kernel. >=20 > > IOW, isn't the correct fix to use pvcpuid instead of cpuid when > > xen_pvdomain() is true? >=20 > Every use of cpuid in the kernel goes via the cpuid pvop, which ends up > doing the Xen cpuid rather than the native one. Usermode cpuid is > still the "real" one, unless they explicitly use the Xen version. OK, then I'm confused. Either: - this is one of those recent Intel boxes where all the TSCs should be sync'ed but due to firmware issues they are not, in which case this is a Linux bug that has already been fixed upstream; or - this isn't Xen 4.0+ but should be fixed in 4.0; or - this is Xen 4.0+ and the default tsc_mode is being overridden Otherwise, why is TSC not synchronized and pvclock always getting an offset of 0? Apologies if this was stated in a differently titled thread of this conversation but, Jed, what is your Xen version?