From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBPJu-0004WY-Ry for qemu-devel@nongnu.org; Mon, 19 Aug 2013 09:16:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBPJo-0002e6-SS for qemu-devel@nongnu.org; Mon, 19 Aug 2013 09:16:30 -0400 Message-ID: <52121A7B.6070202@redhat.com> Date: Mon, 19 Aug 2013 15:15:39 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1375863692-12207-1-git-send-email-aik@ozlabs.ru> <1375863692-12207-4-git-send-email-aik@ozlabs.ru> <1376345257.22121.16.camel@ul30vt.home> In-Reply-To: <1376345257.22121.16.camel@ul30vt.home> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/8] vfio: Introduce VFIO address spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: Anthony Liguori , "Michael S . Tsirkin" , Alexey Kardashevskiy , qemu-devel@nongnu.org, Alexander Graf , qemu-ppc@nongnu.org, Paul Mackerras , David Gibson Il 13/08/2013 00:07, Alex Williamson ha scritto: >> > + if (pci_iommu_as(pdev) != &address_space_memory) { >> > + error_report("vfio: DMA address space must be system memory"); >> > + return -ENXIO; > -EFAULT? It's a bad address of sorts. > Accessing it would SIGSEGV, so it is not really EFAULT. I would just use EINVAL, the numeric error code will go away as soon as initfn is changed to use "Error *" (which is needed to propagate sensible error messages to the QMP client). Paolo