From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQFgi-0005zG-Cb for qemu-devel@nongnu.org; Fri, 14 Aug 2015 10:10:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQFgd-0007td-78 for qemu-devel@nongnu.org; Fri, 14 Aug 2015 10:10:28 -0400 Received: from c2.beyond.pl ([91.102.115.84]:53262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQFgc-0007sv-T7 for qemu-devel@nongnu.org; Fri, 14 Aug 2015 10:10:23 -0400 References: <20150813221650.GA8109@amt.cnet> <55CD9968.7000202@beyond.pl> <55CDAC18.4060406@beyond.pl> From: =?UTF-8?Q?Marcin_Gibu=c5=82a?= Message-ID: <55CDF6C9.80001@beyond.pl> Date: Fri, 14 Aug 2015 16:10:17 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] about the patch kvmclock Ensure proper env->tsc value for kvmclock_current_nsec calculation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: liang.z.li@intel.com > So, the problem is cause by stop_vm(RUN_STATE_PAUSED), in this case the env->tsc is not updated, which lead to the issue. > Is that right? I think so. > If the cpu_clean_all_dirty() is needed just for the APIC status reason, I think we can do the cpu_synchronize_all_states() in do_vm_stop > and after vm_state_notify() when the RUN_STATE_PAUSED is hit, at this point all the device models is stopped, there is no outdated APIC status. Yes, cpu_clean_all_dirty() was needed because without it, the second call to cpu_synchronize_all_states() (which is done inside qemu_savevm_state_complete() and after kvmclock) does nothing. > I want to write a patch to fix this issue in another way, could help to verify it in you environment, very appreciate if you could. Sure, I'll test it. Both issues were quite easy to reproduce. -- mg