From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [patch 07/18] x86: pvclock: add note about rdtsc barriers Date: Thu, 15 Nov 2012 16:30:38 +0400 Message-ID: <50A4E06E.9020008@parallels.com> References: <20121115000823.285102321@redhat.com> <20121115000944.264435009@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: , , , , , , To: Marcelo Tosatti Return-path: Received: from mx2.parallels.com ([64.131.90.16]:48547 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1767615Ab2KOMap (ORCPT ); Thu, 15 Nov 2012 07:30:45 -0500 In-Reply-To: <20121115000944.264435009@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/15/2012 04:08 AM, Marcelo Tosatti wrote: > As noted by Gleb, not advertising SSE2 support implies > no RDTSC barriers. > > Signed-off-by: Marcelo Tosatti And this gets a separate patch because? > Index: vsyscall/arch/x86/include/asm/pvclock.h > =================================================================== > --- vsyscall.orig/arch/x86/include/asm/pvclock.h > +++ vsyscall/arch/x86/include/asm/pvclock.h > @@ -74,6 +74,9 @@ unsigned __pvclock_read_cycles(const str > u8 ret_flags; > > version = src->version; > + /* Note: emulated platforms which do not advertise SSE2 support > + * result in kvmclock not using the necessary RDTSC barriers. > + */ And the expected effects are? Will it work in that case? Any precautions one must take? Is it safe for Xen? Is it safe for KVM? Those are the types of things I'd expect to see in a comment for something as subtle as this. > rdtsc_barrier(); > offset = pvclock_get_nsec_offset(src); > ret = src->system_time + offset; >