From: Alex Bligh Subject: Re: [PATCH] xen: xen_sync_dirty_bitmap: attempt to fix SEGV Date: Wed, 06 Mar 2013 14:35:38 +0000 Message-ID: <6AEE06E4395BA377613977FB@nimrod.local> References: <89D1720972979969F5F2FA5A@Ximines.local> <1362579002-7981-1-git-send-email-alex@alex.org.uk> <20791.20406.657234.174164@mariner.uk.xensource.com> Reply-To: Alex Bligh Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20791.20406.657234.174164@mariner.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Stefano Stabellini , Ian Campbell , Alex Bligh , xen-devel List-Id: xen-devel@lists.xenproject.org Ian, --On 6 March 2013 14:16:22 +0000 Ian Jackson wrote: > Alex Bligh writes ("[PATCH] xen: xen_sync_dirty_bitmap: attempt to fix SEGV"): >> When xc_hvm_track_dirty_vram fails, iterate through pages based on >> vram_offset and npages, rather than start_addr and size. DPRINTF >> before the loop in the hope of seeing output before SEGV. > > See email just sent. I have a comprehensible stack trace. If you'd > still like me to try this patch I can do so but it might be easier for > you to ask me to poke my gdb ... Thanks. So the good news is that it is xen_sync_dirty_bitmap that is the culprit, as we suspected. My question is: does the call to cpu_physical_memory_set_dirty occur within the "if (rc<0)" block, as I suspect, or does it occur within the "for (i = 0; i < ARRAY_SIZE(bitmap); i++)" block? (it's called in two places from xen_sync_dirty_bitmap) If the former, then I think the problem is that the address that cpu_physical_memory_set_dirty (and xen_modified_memory) takes needs to be passed through get_physmapping()->phys_offset before use, like the second case already does. In this case the patch I've just sent should (hopefully) work. If the latter, then something else is broken. -- Alex Bligh