From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYKUb-0005i2-Dk for qemu-devel@nongnu.org; Tue, 23 Feb 2016 16:27:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYKUa-0004OJ-Fg for qemu-devel@nongnu.org; Tue, 23 Feb 2016 16:27:37 -0500 References: <20160111045519.GE22925@voom.redhat.com> <56935D3A.1030709@ilande.co.uk> <20160112024421.GH22925@voom.redhat.com> <56993062.4030604@ilande.co.uk> <20160118045113.GL9301@voom.fritz.box> <56A5B712.9070808@ilande.co.uk> <20160125111008.GG32205@voom.redhat.com> <56A7F3B7.3080908@ilande.co.uk> <20160201005218.GY23043@voom.redhat.com> <56B13EB4.9000309@ilande.co.uk> <20160203045926.GH15080@voom.fritz.box> From: Mark Cave-Ayland Message-ID: <56CCCEAD.70805@ilande.co.uk> Date: Tue, 23 Feb 2016 21:27:09 +0000 MIME-Version: 1.0 In-Reply-To: <20160203045926.GH15080@voom.fritz.box> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Migrating decrementer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: quintela@redhat.com, Alexey Kardashevskiy , qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, amit.shah@redhat.com On 03/02/16 04:59, David Gibson wrote: >> Going back to your earlier email you suggested that the host timebase is >> always continuously running, even when the guest is paused. But then >> resuming the guest then the timebase must jump in the guest regardless? >> >> If this is the case then this is the big difference between TCG and KVM >> guests: TCG timebase is derived from the virtual clock which solves the >> problem of paused guests during migration. For example with the existing >> migration code, what would happen if you did a migration with the guest >> paused on KVM? The offset would surely be wrong as it was calculated at >> the end of migration. > > So there are two different cases to consider here. Once is when the > guest is paused incidentally, such as during migration, the other is > when the guest is explicitly paused. > > In the first case the timebase absolutely should keep running (or > appear to do so), since it's the primary source of real time for the > guest. I'm not sure I understand this, since if the guest is paused either deliberately or incidentally during migration then isn't the timebase also frozen? Or is it external to the CPU? > In the second case, it's a bit unclear what the right thing to do is. > Keeping the tb running means accurate realtime, but stopping it is > often better for debugging, which is one of the main reasons to > explicitly pause. > > I believe spapr on KVM HV will keep the TB going, but the TSC on x86 > will be stopped. Is this from a guest-centric view, i.e. if I pause a VM and wait 20 mins then when the guest resumes the timebase will jump forward by 20 mins worth of ticks? ATB, Mark.