From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH] svm: Do not intercept RDTCS(P) when TSC scaling is supported by hardware Date: Fri, 20 Apr 2012 11:27:18 -0400 Message-ID: <4F918056.3040200@amd.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Keir Fraser Cc: wei.huang2@amd.com, Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org On 04/20/12 04:45, Keir Fraser wrote: > On 20/04/2012 09:15, "Jan Beulich" wrote: > >>> svm: Do not intercept RDTCS(P) when TSC scaling is supported by hardware >>> >>> When running in TSC_MODE_ALWAYS_EMULATE mode on processors that support >>> TSC scaling we don't need to intercept RDTSC/RDTSCP instructions. >> >> While the patch itself looks fine, I'm having difficulty to connect the >> mentioning of TSC_MODE_ALWAYS_EMULATE to it - afaics all modes >> are affected as long as they result in d->arch.vtsc to be set. > > I think the real point of this patch is they *never* want to trap and > emulate RDTSC on these newer processors. Right. Mentioning TSC_MODE_ALWAYS_EMULATE explicitly wasn't probably a particularly good idea. The reason I did that was because with TSC_MODE_DEFAULT guests (at least Linux guests) typically don't use TSC since TSC ends up being declared non-invariant. -boris