Received: from eggs.gnu.org ([2001:4830:134:3::10]:54405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMct1-0007XF-Uq for qemu-devel@nongnu.org; Wed, 27 Aug 2014 09:03:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMcst-0004zH-8P for qemu-devel@nongnu.org; Wed, 27 Aug 2014 09:03:39 -0400 Received: from mail.ispras.ru ([83.149.199.45]:40528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMcst-0004yp-0a for qemu-devel@nongnu.org; Wed, 27 Aug 2014 09:03:31 -0400 From: "Pavel Dovgaluk" References: <20140826071427.1672.48119.stgit@PASHA-ISP> <20140826071503.1672.32964.stgit@PASHA-ISP> <53FC5ADE.8030306@redhat.com> <002401cfc1f0$b5aefe50$210cfaf0$@Dovgaluk@ispras.ru> <53FDD09C.4040208@redhat.com> In-Reply-To: <53FDD09C.4040208@redhat.com> Date: Wed, 27 Aug 2014 17:03:30 +0400 Message-ID: <002b01cfc1f7$4c954e90$e5bfebb0$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH 06/12] kvmvapic: fixing loading vmstate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , qemu-devel@nongnu.org Cc: zealot351@gmail.com, maria.klimushenkova@ispras.ru > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > Il 27/08/2014 14:16, Pavel Dovgaluk ha scritto: > >> > Can you use a vm_change_state_handler, or a QEMU_CLOCK_VIRTUAL timer > >> > with expiration time in the past (e.g. at time zero) to run the sync > >> > code as soon as possible? Then you can preserve the current migration > >> > format and avoid using the invalid APIC state. > > Does this method guarantee, that nobody (like other timers) will access > > APIC between loading the vmstate and invocation of the timer? > > Hmm, probably not. The bug would not be other timers accessing the > APIC, because that would also call apic_sync_vapic and the only effect > would be an extra useless synchronization. The bug would happen if the > APIC is accessed by the CPU before the timer has the occasion to run. Sorry, but I don't understand which problem we will solve with apic_sync_vapic. All fields that were added to vmstate are not affected by this function. Could you explain your idea? Pavel Dovgalyuk