From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUwvT-000841-Up for qemu-devel@nongnu.org; Fri, 19 Sep 2014 08:04:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUwvJ-0001LD-Vl for qemu-devel@nongnu.org; Fri, 19 Sep 2014 08:04:35 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:35703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUwvJ-0001Ik-Hr for qemu-devel@nongnu.org; Fri, 19 Sep 2014 08:04:25 -0400 Received: by mail-wi0-f176.google.com with SMTP id ex7so4751696wid.15 for ; Fri, 19 Sep 2014 05:04:19 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <541C1BBE.6090808@redhat.com> Date: Fri, 19 Sep 2014 14:04:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1410530338-17615-1-git-send-email-pbonzini@redhat.com> <1410530338-17615-14-git-send-email-pbonzini@redhat.com> <30501.4520571151$1411123417@news.gmane.org> In-Reply-To: <30501.4520571151$1411123417@news.gmane.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgaluk , qemu-devel@nongnu.org Il 19/09/2014 12:43, Pavel Dovgaluk ha scritto: > I've tested this patch with replay. I enabled VM reset (which was previously disabled for replay) > while loading the VM state and discovered the following problem. > vapic_enable function in kvmapic.c retrieves cpu number with the get_kpcr_number() function. > When cpu number is -1 vapic_enable exits and does not call apic_enable_vapic, which should > setup vapic_paddr field. > Without this call vapic_paddr remains initialized with default value and behavior of the virtual > machine becomes different. IIUC the fix would be to move part of vapic_enable out to its separate function, and call it from do_vapic_enable? Could you prepare a patch? Paolo