From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Date: Wed, 05 Nov 2008 14:06:50 +0000 Subject: Re: large page size virtio issues Message-Id: <4911A87A.4010209@us.ibm.com> List-Id: References: <1225836860.15410.32.camel@localhost.localdomain> In-Reply-To: <1225836860.15410.32.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org Rusty Russell wrote: > On Wednesday 05 November 2008 09:14:20 Hollis Blanchard wrote: > >> Hi Rusty, I'm using a patch that changes the Linux base page size to >> 64K. (This is actually pretty common in ppc64 world, but I happen to be >> trying it on ppc32.) >> >> I'm seeing a problem with virtio. I think at least part of it can be >> explained by qemu's TARGET_PAGE_BITS=12, and the guest's >> PAGE_SHIFT=16. The guest allocates the queue, then passes the pfn (pa >> >> >>>> PAGE_SHIFT) to the virtio backend (vp_find_vq()). The backend then >>>> >> calculates the pa as pfn << TARGET_PAGE_BITS. >> >> I have to run right now, but quickly changing qemu TARGET_PAGE_BITS to >> 16 got me a little further but still didn't work. Any thoughts? >> > > I see Anthony hardwired page size into the queue activation ABI for > virtio_pci. So did you FWIW, virtio-balloon passes PFNs which are computed based on PAGE_SHIFT. > I think that this should be an actual 4096 (or 12) rather than > depending on guest page size: > So is the issue that PPC can support 4k or 16k pages, and the guest happens to always use 16k pages? Does the guest set any global flag indicating it is using 16k pages? Is this anyway we could detect this in QEMU? I don't much like the idea of globally hard coding it to 4k. I'd rather make it architecture specific. Regards, Anthony Liguori > virtio_pci.c:247: > iowrite32(virt_to_phys(info->queue) >> PAGE_SHIFT, > vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); > > Anthony? > > Cheers, > Rusty. >