From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTuTE-00040z-Hi for qemu-devel@nongnu.org; Tue, 16 Sep 2014 11:15:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTuT8-0004UA-Cn for qemu-devel@nongnu.org; Tue, 16 Sep 2014 11:15:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTuT8-0004MQ-6C for qemu-devel@nongnu.org; Tue, 16 Sep 2014 11:15:02 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8GFEvVo015815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 16 Sep 2014 11:14:57 -0400 Date: Tue, 16 Sep 2014 12:14:37 -0300 From: Marcelo Tosatti Message-ID: <20140916151437.GA27819@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] kvmclock: clarify usage of cpu_clean_all_dirty List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel Explain the cpu_clean_all_dirty call. Signed-off-by: Marcelo Tosatti --- hw/i386/kvm/clock.c | 4 ++++ 1 file changed, 4 insertions(+) Index: qemu/hw/i386/kvm/clock.c =================================================================== --- qemu.orig/hw/i386/kvm/clock.c 2014-09-16 12:12:00.622537799 -0300 +++ qemu/hw/i386/kvm/clock.c 2014-09-16 12:12:44.696555868 -0300 @@ -127,6 +127,10 @@ } cpu_synchronize_all_states(); + /* + * Make sure that CPU state is synchronized from KVM + * once every VM state change callback has finished. + */ cpu_clean_all_dirty(); ret = kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, &data); if (ret < 0) {