From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1U4P-0008Ks-6w for qemu-devel@nongnu.org; Wed, 25 Nov 2015 02:00:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1U4K-0004Bu-3P for qemu-devel@nongnu.org; Wed, 25 Nov 2015 02:00:49 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:36689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1U4J-0004Bg-Jx for qemu-devel@nongnu.org; Wed, 25 Nov 2015 02:00:43 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NYC0066SZH5K020@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 25 Nov 2015 07:00:41 +0000 (GMT) From: Pavel Fedin References: <00fe01d1210c$1be12880$53a37980$@samsung.com> <1447884282.4697.111.camel@redhat.com> In-reply-to: Date: Wed, 25 Nov 2015 10:00:40 +0300 Message-id: <00a201d1274e$ff0bf0c0$fd23d240$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit Content-language: ru Subject: Re: [Qemu-devel] [PATCH] vfio: Align iova also to IOMMU page size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Peter Maydell' , 'Alex Williamson' Cc: 'QEMU Developers' Hello! > There are a number of different interesting page sizes here: > * the host kernel page size > * the target CPU architecture's worst-case smallest page size > * the page size the guest kernel is actually using at the moment > (consider a 4K-page guest kernel on a 64K-page host kernel) > > These don't necessarily have to all be the same. I would > expect VFIO to be interested in the host kernel page size, > not TARGET_PAGE_ALIGN. So would the appropriate fix be just replacing TARGET_PAGE_ALIGN with HOST_PAGE_ALIGN? Alex: there's however, still no answer to "why are we aligning up, not down?" question.. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia