From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOtOL-0004GI-Lh for qemu-devel@nongnu.org; Thu, 28 Jan 2016 15:42:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOtOH-0000Ys-Kq for qemu-devel@nongnu.org; Thu, 28 Jan 2016 15:42:09 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:34333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOtOH-0000YK-Da for qemu-devel@nongnu.org; Thu, 28 Jan 2016 15:42:05 -0500 Received: by mail-wm0-x243.google.com with SMTP id p63so6034987wmp.1 for ; Thu, 28 Jan 2016 12:42:05 -0800 (PST) Sender: Paolo Bonzini References: <1454010530-16804-1-git-send-email-ppandit@redhat.com> <56AA72A8.4040302@redhat.com> From: Paolo Bonzini Message-ID: <56AA7D17.8040903@redhat.com> Date: Thu, 28 Jan 2016 21:41:59 +0100 MIME-Version: 1.0 In-Reply-To: <56AA72A8.4040302@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] ide: ahci: add check before calling dma_memory_unmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , P J P , QEMU Developers Cc: Peter Maydell , Prasad J Pandit , Zuozhi fzz On 28/01/2016 20:57, John Snow wrote: > This is fine for now as it protects us against doing something stupid in > a mechanical fashion, but I still wonder under which case we are > "starting" the FIS or CLB engines without getting a valid address. (The > unmap should only be happening when we /stop/ the engines, which implies > they were started -- which points to a bug somewhere else, too.) It can happen if both of them are registered to an MMIO address. The second map will fail. Perhaps it's a better fix to switch FIS and CLB to address_space_read/write, but this works as a simple fix for the SEGV. Paolo