From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86: Adjust rdtsc inline assembly Date: Wed, 18 Feb 2015 13:59:08 +0000 Message-ID: <54E49AAC.7010407@citrix.com> References: <1424262318-3405-1-git-send-email-andrew.cooper3@citrix.com> <54E49D99020000780006114E@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54E49D99020000780006114E@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Keir Fraser , Xen-devel List-Id: xen-devel@lists.xenproject.org On 18/02/15 13:11, Jan Beulich wrote: >>>> On 18.02.15 at 13:25, wrote: >> The single use of the old rdtsc() in emulate_privileged_op() is altered to use >> the new rdtsc() and the rdmsr_writeback path to set eax/edx appropriately. > I'm not entirely sure about this one - the current code surely is slightly > faster than the replacement. Question is how much this matters. I'd > suggest to be on the safe side and simply open-code the asm() there. It is a matter of a 4 instructions on a fault slowpath, which which only ever executed in the unlikely case that vtsc is enabled on a domain, or the kernel has set CR4.TSD. I would not loose sleep over the introduced inefficiently. ~Andrew