From: "Jan Beulich" Subject: RE: rdtscP and xen (and maybe the app-tsc answer I've been looking for) Date: Tue, 22 Sep 2009 08:44:22 +0100 Message-ID: <4AB89C7602000078000162B0@vpn.id2.novell.com> References: <4AB80335.2090008@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: kurt.hackel@oracle.com, Jeremy Fitzhardinge , "Xen-Devel (E-mail)" , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> Dan Magenheimer 22.09.09 01:29 >>> >Yes, I neglected an important pre-condition. ASSUME the first >rdtscp on pcpu-A gets a version mismatch so that it must fetch >the parameters again. Then: the vcpu switches pcpu TWICE >from pcpu-A to pcpu-B and back to pcpu-A and does rdtscp >each time on pcpu-A but reads one or more pvclock parameters >(that are too big to be encoded in TSC_AUX) on pcpu-B. This fundamentally depends on how the pvclock parameters are being read: While app-accessible MSRs inherently require each of the necessary RDMSRs to be executed on the correct {p,v}CPU (unless you encode the CPU number in the RDMSR input), an app accessible shared memory region wouldn't have that property. Jan