From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7MXh-0000WZ-Pt for qemu-devel@nongnu.org; Mon, 30 May 2016 08:43:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7MXf-00084R-JP for qemu-devel@nongnu.org; Mon, 30 May 2016 08:43:36 -0400 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:32845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7MXf-00084L-8E for qemu-devel@nongnu.org; Mon, 30 May 2016 08:43:35 -0400 Received: by mail-vk0-x22a.google.com with SMTP id r140so221205748vkf.0 for ; Mon, 30 May 2016 05:43:35 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Peter Maydell Date: Mon, 30 May 2016 13:43:15 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] virtio_mmio address mapping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dean <664543912@qq.com> Cc: qemu-devel On 30 May 2016 at 13:24, Dean <664543912@qq.com> wrote: > I am writing a UIO linux driver for a virtio_mmio device and find out that all those virtio_mmio devices' registers are arrange in one single 4K aligned page. > which makes writing an UIO driver hard since linux doesn't allow UIO driver to map a register space smaller than page size. > would you consider divide them into defferent pages? > > what I am talking about is devices like: > a003000.virtio_mmio > a003c00.virtio_mmio > a003e00.virtio_mmio > > what I am dealing with is a003e00.virtio_mmio Unfortunately we can't really move them, for backwards compatibility reasons. Also, virtio-mmio is now pretty much obsolete since you can use virtio-pci instead, and we wouldn't want it to take up much more of the physical address space. thanks -- PMM