From: Keir Fraser Subject: Re: [PATCH] Implement rdtscp emulation and rdtscp_aux "support" Date: Thu, 26 Nov 2009 10:50:33 +0000 Message-ID: References: <4B0E65F80200007800022307@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4B0E65F80200007800022307@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: Dan Magenheimer , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org On 26/11/2009 10:26, "Jan Beulich" wrote: >> I'll fix this. While I'm at it, I think our PV emulation of MOV CR4,reg is >> broken -- should just return v->arch.guest_context.ctrlreg[4], would you >> agree? Otherwise guest's CR4.TSD isn't returned. > > Indeed, with the real bit no longer necessarily being in sync with the > guest specified one simply reading the physical register doesn't work > anymore. I'm somewhat uncertain about returning > v->arch.guest_context.ctrlreg[4] though, since there should have > been a reason we used the more expensive read of the real register > (but looking at the code I can't determine that hypothetical reason). I expect it's old code which predates things like pv_guest_cr4_fixup(). Since you can't see any reason why we should use read_cr4() either these days, I'll change it. -- Keir