From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qnpiu-0004zv-5A for qemu-devel@nongnu.org; Mon, 01 Aug 2011 06:27:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qnpis-0004h9-Tk for qemu-devel@nongnu.org; Mon, 01 Aug 2011 06:27:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qnpis-0004gx-M2 for qemu-devel@nongnu.org; Mon, 01 Aug 2011 06:27:46 -0400 Message-ID: <4E367F9D.1080304@redhat.com> Date: Mon, 01 Aug 2011 13:27:41 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1312141678-5141-1-git-send-email-avi@redhat.com> <4E365718.2060500@web.de> <4E365B3A.7050701@web.de> <4E3660C9.3000708@redhat.com> <4E366C56.90705@siemens.com> <4E3675D1.4060309@redhat.com> <4E367E2B.6060107@siemens.com> In-Reply-To: <4E367E2B.6060107@siemens.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] memory: synchronize dirty bitmap before unmapping a range List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" On 08/01/2011 01:21 PM, Jan Kiszka wrote: > > > > Note that drop/add is always paired (i.e. the guest never sees an > > unmapped area), and we always map the full 64k even though cirrus code > > manages each 32k bank individually. It looks optimal... we're probably > > not testing the same thing (either qemu or guest code). > > This is what my instrumentation revealed: > > map_linear_vram_bank 0 > map 0 (actually perform the mapping) > map_linear_vram_bank 1 > map 1 > 4 a0000 0 7fe863a62000 1 (KVM_SET_USER_MEMORY_REGION) > 4 a0000 10000 7fe863a72000 1 > run (enter guest) > map_linear_vram_bank 0 > map 0 > map_linear_vram_bank 1 > map 1 > 4 a0000 0 7fe863a72000 1 > 4 a0000 10000 7fe863a62000 1 > run > map_linear_vram_bank 0 > map 0 > map_linear_vram_bank 1 > map 1 > 4 a0000 0 7fe863a62000 1 > run > map_linear_vram_bank 0 > map 0 > map_linear_vram_bank 1 > map 1 > run > > So we suddenly get out of sync and enter the guest with an unmapped vram > segment. I takes a long time (in number of map changes) until the region > becomes mapped again. I'll try to reproduce. Yes, it looks like a bug in the core, perhaps in the symmetric-difference code. -- error compiling committee.c: too many arguments to function