WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] non-emulated rdtsc: a smoking gun!

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] non-emulated rdtsc: a smoking gun!
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Thu, 22 Oct 2009 14:24:50 -0700
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, kurt.hackel@xxxxxxxxxx, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, chris.mason@xxxxxxxxxx, Avi Kivity <avi@xxxxxxxxxx>
Delivery-date: Thu, 22 Oct 2009 14:25:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <b7a6438c-8ed2-43f5-81fe-6f72d47ab1df@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: <b7a6438c-8ed2-43f5-81fe-6f72d47ab1df@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4
On 10/22/09 13:53, Dan Magenheimer wrote:
> I just found a Linux kernel use of rdtsc that
> MAY cause a significant failure if rdtsc is
> unemulated and a poorly timed migration (or
> save/restore) occurs under Xen or KVM.
>
> The problem is that a call to __udelay() --
> or any member of the delay() family -- may
> return prematurely**.  Since these functions
> "must guarantee that we wait at least the
> amount of time" specified, there are likely
> unknown kernel circumstances where a
> premature return will cause problems.
> (Disclaimer: I haven't gone through every use
> of every call site of every member of the delay
> function family to prove this.)
>   

It won't matter, as they're only used to control timing to external IO
devices.  If a domain has a passthrough device, it can't be migrated or
save/restored.  Nobody should be using them for software timing.

    J

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>