From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR0M2-0004w9-Ee for qemu-devel@nongnu.org; Fri, 21 Mar 2014 10:23:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR0Ls-0000zk-BP for qemu-devel@nongnu.org; Fri, 21 Mar 2014 10:23:26 -0400 Message-ID: <532C4B4A.6030807@redhat.com> Date: Fri, 21 Mar 2014 15:23:06 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1394603550-11556-1-git-send-email-aik@ozlabs.ru> <1394603550-11556-8-git-send-email-aik@ozlabs.ru> <1395259061.8201.242.camel@ul30vt.home> <532BF15C.7030802@ozlabs.ru> <1395411438.632.52.camel@ul30vt.home> In-Reply-To: <1395411438.632.52.camel@ul30vt.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson , Alexey Kardashevskiy Cc: Alexander Graf , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Il 21/03/2014 15:17, Alex Williamson ha scritto: >> > > Is this possible? Assuming len is initially a power-of-2, would the >> > > translate function change it? Maybe worth a comment to explain. >> >> >> Oh. address_space_translate() actually changes @len to min(len, >> TARGET_PAGE_SIZE) and TARGET_PAGE_SIZE is hardcoded to 4K. So far it was ok >> but lately I have been implementing a huge DMA window (plus one >> sPAPRTCETable and one VFIOGuestIOMMU objects) which currently operates with >> 16MB pages (can do 64K pages too) and now this "granularity incompatible" >> is happening. >> >> I disabled that check but I need to think of better fix... >> >> Adding Paolo to cc, may be he picks the context and gives good piece of >> advise :) I think that "if" in address_space_translate should be restricted to Xen, since that's what it was added for. Paolo