From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41829 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZnPs-0007W9-GO for qemu-devel@nongnu.org; Mon, 03 Jan 2011 11:37:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZnPm-0000Py-Bt for qemu-devel@nongnu.org; Mon, 03 Jan 2011 11:37:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZnPm-0000Pu-4Y for qemu-devel@nongnu.org; Mon, 03 Jan 2011 11:37:46 -0500 From: Glauber Costa In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Mon, 03 Jan 2011 14:37:41 -0200 Message-ID: <1294072661.5370.22.camel@mothafucka.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2 14/17] kvm: x86: Introduce kvmclock device to save/restore its state List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Jan Kiszka , Marcelo Tosatti , Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org On Mon, 2011-01-03 at 09:33 +0100, Jan Kiszka wrote: > From: Jan Kiszka > > If kvmclock is used, which implies the kernel supports it, register a > kvmclock device with the sysbus. Its main purpose is to save and restore > the kernel state on migration, but this will also allow to visualize it > one day. > > Signed-off-by: Jan Kiszka > CC: Glauber Costa Hi Jan. I've just recently posted a patch (not sure what was made from it), that fixes a bug that you reintroduce here. The bug is: if we call KVM_GET_CLOCK ioctl in pre_save, this means that this value will change every time we issue savevm, even if the machine is not run in between. Ideally, we'd like to have two consecutive savevms returning the exact same thing in that situation. I like the general approach of moving it to sysbus, but please move the ioctl to change state notifiers. Cheers!