From owner-freebsd-virtualization@FreeBSD.ORG Wed Dec 10 22:39:47 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3A6EAB8; Wed, 10 Dec 2014 22:39:46 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA65CE82; Wed, 10 Dec 2014 22:39:46 +0000 (UTC) Received: by mail-ig0-f179.google.com with SMTP id r2so3823471igi.6 for ; Wed, 10 Dec 2014 14:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kk2gcPWmPFbMcRfw7SNFIfMAtMSCouQ+tKGwEpfsIOA=; b=VkW123Y+IB4UU9He7cpZ0eOFyYJml1/19gqmX0iUZrAAhzsWLkYf6jdmaYOmgV7B/Z H3sUJxe/KFGE8Pkid7WluAFe8/7BJJcGLr7jNNmwr652nBCw7AA4SrYesQLyXRGEybgI jJuB191jQ+GSotQ3QSnhG7RosOxxyuzcryeIlW/T/iyseGTNb470eLQ7O4I0djoCEtFk JaqkVWWqByUj1t8V3csIQv5Cc7x2i4cjTk7aIVMFde/DnGSRO65MmPa/rRA93O7YrLx2 Km06h3jrhaLD7/AwagP1t8h28tnOyLA35y3A1e4d7Bw3eL0Kb9vkvKde35eS1bQDcDFi 429w== MIME-Version: 1.0 X-Received: by 10.43.181.69 with SMTP id ph5mr8910718icc.83.1418251186195; Wed, 10 Dec 2014 14:39:46 -0800 (PST) Received: by 10.107.10.31 with HTTP; Wed, 10 Dec 2014 14:39:46 -0800 (PST) In-Reply-To: References: <52D6B18D.4080204@citrix.com> <1389805150.16498.18.camel@janus.xn--pl-wia.net> <3298215.G6vx8QjdMB@pippin.baldwin.cx> Date: Wed, 10 Dec 2014 17:39:46 -0500 Message-ID: Subject: Re: KVM Clock From: Ryan Stone To: Julian Stecklina Content-Type: text/plain; charset=UTF-8 Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2014 22:39:47 -0000 On Mon, Jan 20, 2014 at 7:41 PM, Julian Stecklina wrote: > Ah. Thanks. This will do. Something like access_once would be perfect, though. > > I'll post an updated patch that does not duplicate code that is in xen/ soonish. Didn't get around to testing it the last days. > > Julian I'm interesting in helping to get this into the tree. I see that you've address all of the comments in this thread here: https://github.com/blitz/freebsd/commit/e130f4ba550eb905c7f56a6a26243660b4df834b I have one final question. Don't we need to run rdtsc() in the loop in pvclock_fetch_vcpu_tinfo()? If we don't, isn't there a chance that after we leave the loop, the hypervisor could migrate the guest to a different CPU where the value returned by rdtsc() will not match the parameters in the pvclock_time_info structure?