From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Question on skip_emulated_instructions() Date: Thu, 8 Apr 2010 10:19:53 +0300 Message-ID: <20100408071953.GI303@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> <4BBD82ED.9010105@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Yoshiaki Tamura , kvm@vger.kernel.org, Marcelo Tosatti To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43299 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758396Ab0DHHT5 (ORCPT ); Thu, 8 Apr 2010 03:19:57 -0400 Content-Disposition: inline In-Reply-To: <4BBD82ED.9010105@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Apr 08, 2010 at 10:17:01AM +0300, Avi Kivity wrote: > 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. > For "in" or "mmio read" you can't complete instruction without doing actual IO. > > 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 -- Gleb.