From owner-freebsd-virtualization@FreeBSD.ORG Fri Apr 10 21:36:49 2015 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 DE5285FE; Fri, 10 Apr 2015 21:36:49 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1BD7AB5; Fri, 10 Apr 2015 21:36:49 +0000 (UTC) Received: by iebmp1 with SMTP id mp1so27873782ieb.0; Fri, 10 Apr 2015 14:36:49 -0700 (PDT) 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=m9Q9ElWaULpeiW86ZkcFIPe6/mzAcbdGLWuiBNoeBt0=; b=Rp3uXkcJXpKjxKft3Xg7b3nr6RWJIF5c/sla/Sv0mrHgdgAhoDrJMxITILUvLo4ErI A4IKjOFEl2fM/tkPEGwR/N6PnQHRoFOX+qPDZLIoe/g1GYbgVuNzOKOuJlRXRDIPD9Gf LwwsPrBITMR5FuM2dGVFoDZRrsyzeEujhtfqECTL8BAMIhGLOaCCF/TfkYSTtQv72on4 6+s30FAfbD3tH6mf1iKG13ZKXQSxDMz1tVsa5s0E92/YfJe4SBisPlHUOMj9fyEHQCgU CdUd/ZaIQ7+LvEqmUwFnjtLBxqgvgLwekeK4v/Q6ZBQVYESNXE66VR5e8ETEsw9VZRWM ULEg== MIME-Version: 1.0 X-Received: by 10.42.207.206 with SMTP id fz14mr6426070icb.34.1428701809109; Fri, 10 Apr 2015 14:36:49 -0700 (PDT) Received: by 10.107.156.75 with HTTP; Fri, 10 Apr 2015 14:36:49 -0700 (PDT) In-Reply-To: <5528115B.7060509@freebsd.org> References: <552809F4.6070206@redbarn.org> <552810CE.7020502@redbarn.org> <5528115B.7060509@freebsd.org> Date: Fri, 10 Apr 2015 17:36:49 -0400 Message-ID: Subject: Re: bhyve clock problem, solved by kern.timecounter.hardware="TSC-low" in /etc/sysctl.conf From: Ryan Stone To: Allan Jude Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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: Fri, 10 Apr 2015 21:36:50 -0000 Using the TSC as the default timecounter in a VM is dangerous. On some hardware, the TSC is not synchronized across all CPU cores. This means that if a VM migrates from one core to another, it could see the timecounter value go backwards. Time jumping backwards can cause all kinds of hilarity. What's really needed is for bhyve to support KVM clock or a similar scheme (brianv@ might also still need to commit the guest side of KVM clock as well).