Received: from eggs.gnu.org ([2001:4830:134:3::10]:43609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRboZ-0007jR-2R for qemu-devel@nongnu.org; Wed, 10 Sep 2014 02:55:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRboT-00038Z-EH for qemu-devel@nongnu.org; Wed, 10 Sep 2014 02:55:38 -0400 Received: from mail.ispras.ru ([83.149.199.45]:52919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRboT-00037o-66 for qemu-devel@nongnu.org; Wed, 10 Sep 2014 02:55:33 -0400 From: "Pavel Dovgaluk" References: <1410265809-27247-1-git-send-email-pbonzini@redhat.com> <1410265809-27247-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1410265809-27247-3-git-send-email-pbonzini@redhat.com> Date: Wed, 10 Sep 2014 10:55:28 +0400 Message-ID: <000301cfccc4$356dd340$a04979c0$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH 02/10] apic_common: vapic_paddr synchronization fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , qemu-devel@nongnu.org Cc: amit.shah@redhat.com, dgilbert@redhat.com, quintela@redhat.com > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini > Sent: Tuesday, September 09, 2014 4:30 PM > To: qemu-devel@nongnu.org > Cc: quintela@redhat.com; amit.shah@redhat.com; dgilbert@redhat.com; Pavel.Dovgaluk@ispras.ru > Subject: [PATCH 02/10] apic_common: vapic_paddr synchronization fix > > From: Pavel Dovgalyuk > > This patch postpones vapic_paddr initialization, which is performed > during migration. When vapic_paddr is synchronized within the migration > process, apic_common functions could operate with incorrect apic state, > if it hadn't loaded yet. This patch postpones the synchronization until > the virtual machine is started, ensuring that the whole virtual machine > state has been loaded. > > Signed-off-by: Pavel Dovgalyuk > Signed-off-by: Paolo Bonzini > --- > hw/i386/kvmvapic.c | 37 ++++++++++++++++++++++++++----------- > 1 file changed, 26 insertions(+), 11 deletions(-) > > diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c > index ee95963..2bcc249 100644 > --- a/hw/i386/kvmvapic.c > +++ b/hw/i386/kvmvapic.c > @@ -59,6 +59,7 @@ typedef struct VAPICROMState { > GuestROMState rom_state; > size_t rom_size; > bool rom_mapped_writable; > + VMChangeStateEntry *vmsentry; > } VAPICROMState; > > #define TYPE_VAPIC "kvmvapic" > @@ -734,11 +735,34 @@ static void do_vapic_enable(void *data) > vapic_enable(s, cpu); > } > > -static int vapic_post_load(void *opaque, int version_id) > +static void kvmvapic_vm_state_change(void *opaque, int running, > + RunState state) Thank you for apic solution. I've tested this one with replay, and it worked fine. Pavel Dovgalyuk