From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxGgl-0004RV-2Y for qemu-devel@nongnu.org; Tue, 26 May 2015 11:22:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxGgg-0007Qu-DB for qemu-devel@nongnu.org; Tue, 26 May 2015 11:22:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxGgg-0007Qa-4y for qemu-devel@nongnu.org; Tue, 26 May 2015 11:22:38 -0400 Message-ID: <1432653754.11375.395.camel@redhat.com> From: Alex Williamson Date: Tue, 26 May 2015 09:22:34 -0600 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] VFIO use of HOST_PAGE_ALIGN List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Alexey Kardashevskiy , Paolo Bonzini , Eric Auger , "qemu-devel@nongnu.org Developers" , Richard Henderson [cc +alexey] On Mon, 2015-05-25 at 00:48 -0700, Peter Crosthwaite wrote: > Hi Alex and all, > > I am working on a patch series to enable multiple CPU architectures to > run at once. It's a long story, but I have hit a snag in hw/vfio/pci.c > which AFAICS is the only in-tree system-mode use of HOST_PAGE_ALIGN > (all usermode code is a non-issue as not looking to support user-mode > multi-arch yet). > > The problem I face, is that this macro depends on translate-all.c's > qemu_host_page_size which in turn, depends on TARGET_PAGE_SIZE. I'm > hoping that one day, TARGET_PAGE_SIZE will be a variable and the users > of it will know to get the correct value depending on their CPU > specific code location. vfio is the only one I can't handle. My > knowledge on vfio is near-0, but my thinking is, since this is not > arch specific code can we instead use the raw host page alignment > rather that the CPU arch specific one? I think we could replace our use of HOST_PAGE_ALIGN with something based only on the host's getpagesize(). I don't see that we really care about the target page size for this usage. Alexey, I think you're the only arch where host and target page sizes can actually be different, do you agree? Thanks, Alex