This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] write_tsc in a PV domain?

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] write_tsc in a PV domain?
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 25 Aug 2009 15:28:01 -0700
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 25 Aug 2009 15:28:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <2812f1b0-adb1-48bc-925e-5fc1e6b22f0c@default>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <2812f1b0-adb1-48bc-925e-5fc1e6b22f0c@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3
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.


Xen-devel mailing list