From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Td2xT-000380-36 for qemu-devel@nongnu.org; Mon, 26 Nov 2012 12:59:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Td2xS-0002MR-3A for qemu-devel@nongnu.org; Mon, 26 Nov 2012 12:59:03 -0500 Received: from ducie-dc1.codethink.co.uk ([37.128.190.40]:59745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Td2xR-0002MK-TX for qemu-devel@nongnu.org; Mon, 26 Nov 2012 12:59:02 -0500 Received: from [192.168.24.102] (snark.dyn.ducie.codethink.co.uk [192.168.24.102]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTPSA id DC6A9460B45 for ; Mon, 26 Nov 2012 17:58:59 +0000 (GMT) Message-ID: <50B3ADE2.4080605@codethink.co.uk> Date: Mon, 26 Nov 2012 17:58:58 +0000 From: Ian Molton MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [BUG] Missing feature, KVM on ARM, dirty page logging. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi folks, I'm looking at dirty page logging on KVM on ARM, which appears, at present to be non-existent. Is anyone working on this, or willing to lend a hand? I'm running KVM on an OMAP5, and my guest is a vexpress-a15 with PL-111 framebuffer. running tcg mode, this works, however in KVM I was seeing (occasionally) one frame of video. Some debugging led me to the dirty_log code, and I discovered that qemu makes a bad test for the return code from kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) in kvm_physical_sync_dirty_bitmap(), so the problem was going unreported. Furthermore, I think the vexpress emulation was missing a call to memory_region_set_log(vram, true, DIRTY_MEMORY_VGA); for the vram region, which was preventing the host kernel knowing that dirty page logging was required. (I think - Im not really very clear on the whole qemu memory API, as AFAICT, its barely documented...) Anyhow, If I add the call to memory_region_set_log(), and if I ask the host kernel to mark absolutely everything as dirty, it does in fact, work. Obviously this is a massive hack, but I'm not too sure where to go on from here, so pointers would be nice. Presumably, I'm going to have to do some prodding of the hosts page tables, but I'm not clear exactly what, as yet. -Ian