From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39390 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POTG9-0008Ls-Hw for qemu-devel@nongnu.org; Fri, 03 Dec 2010 05:53:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POTG7-0005SG-Aj for qemu-devel@nongnu.org; Fri, 03 Dec 2010 05:53:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POTG7-0005Ri-2K for qemu-devel@nongnu.org; Fri, 03 Dec 2010 05:52:59 -0500 From: Glauber Costa Date: Fri, 3 Dec 2010 05:49:32 -0500 Message-Id: <1291373374-10296-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH 0/2] Fix savevm odness related to kvmclock List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvm@vger.kernel.org Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, avi@redhat.com Some users told me that savevm path is behaving oddly wrt kvmclock. The first oddness is that a guarantee we never made (AFAIK) is being broken: two consecutive "savevm" operations, with the machine stopped in between produces different results, due to the call to KVM_GET_CLOCK ioctl. I believe the assumption that if the vm does not run, its saveable state won't change is fairly reasonable. Maybe we should formally guarantee that? The second patch deals with the fact that this happens even if kvmclock is disabled in cpuid: its savevm section is registered nevertheless. Here, I try to register it only if it's enabled at machine start. Thanks Glauber Costa (2): make kvmclock value idempotent for stopped machine Do not register kvmclock savevm section if kvmclock is disabled. cpus.c | 7 +++++++ qemu-kvm-x86.c | 25 +++++++++++++++---------- qemu-kvm.h | 4 ++++ target-i386/kvm.c | 7 +++++++ 4 files changed, 33 insertions(+), 10 deletions(-) -- 1.7.2.3