From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: write_tsc in a PV domain? Date: Tue, 25 Aug 2009 15:28:01 -0700 Message-ID: <4A946571.30904@goop.org> References: <2812f1b0-adb1-48bc-925e-5fc1e6b22f0c@default> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <2812f1b0-adb1-48bc-925e-5fc1e6b22f0c@default> 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: "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org On 08/25/09 14:54, Dan Magenheimer wrote: > Is it "legal" to write to the TSC, e.g. via wrmsr(0x10,x,y), > in a PV kernel? Assuming this were executed and would cause > a GPF, I can't find the code in Xen that would handle it, or > even ignore it. > arch/x86/traps.c:emulate_privileged_op(), case 0x30. It looks like writing to 0x10 would be silently ignored. Allowing it would require careful handling to avoid screwing up timekeeping (you'd need to update the timekeeping parameters), but also fairly pointless because it would only affect the pcpu that the vcpu happens to be running on at that moment. J