From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Question on skip_emulated_instructions() Date: Thu, 08 Apr 2010 10:17:01 +0300 Message-ID: <4BBD82ED.9010105@redhat.com> References: <4BBAB46B.9010405@lab.ntt.co.jp> <20100406100522.GW5235@redhat.com> <20100407154324.GF303@redhat.com> <4BBCC2C9.1040301@redhat.com> <4BBD6959.6080003@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org, Marcelo Tosatti To: Yoshiaki Tamura Return-path: Received: from mx1.redhat.com ([209.132.183.28]:31064 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758498Ab0DHHRF (ORCPT ); Thu, 8 Apr 2010 03:17:05 -0400 In-Reply-To: <4BBD6959.6080003@lab.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On 04/08/2010 08:27 AM, Yoshiaki Tamura wrote: > > The requirement is that the guest must always be able to replay at > least the instruction which triggered the synchronization on the primary. You have two choices: - complete execution of the instruction in both the kernel and the device model This is what live migration does currently. Any mmio and pio requests are completed, the last instruction is finalized, and state is saved. - complete execution of the instruction in the kernel, but queue execution of mmio/pio requests This is more in line with what you describe. vcpu state will be after the instruction, device model state will be before instruction completion, when you replay the queue, the device model state will be consistent with the vcpu state. > From that point of view, I think I need to transfer the vcpu state > before the instruction. If I post a signal and let the guest or > emulator proceed, I'm not sure whether the guest on the secondary can > be replay as expected. Please point out if I were misunderstanding. If the responses to the mmio or pio request are exactly the same, then the replay will happen exactly the same. -- error compiling committee.c: too many arguments to function