From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlY20-0003LO-RW for qemu-devel@nongnu.org; Mon, 02 Jul 2012 00:14:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlY1y-00026W-Vc for qemu-devel@nongnu.org; Mon, 02 Jul 2012 00:14:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlY1y-00026S-Nl for qemu-devel@nongnu.org; Mon, 02 Jul 2012 00:14:34 -0400 Message-ID: <1341202460.1207.384.camel@bling.home> From: Alex Williamson Date: Sun, 01 Jul 2012 22:14:20 -0600 In-Reply-To: <4FF11855.2060605@ozlabs.ru> References: <1340686552.1207.128.camel@bling.home> <20120627123733.GA5449@mwanda> <4FF11855.2060605@ozlabs.ru> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Request VFIO inclusion in linux-next List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Stephen Rothwell , kvm , Greg Kroah-Hartman , "Roedel, Joerg" , linux-kernel , qemu-devel , chrisw , iommu , linux-next@vger.kernel.org, linux-pci , Andrew Morton , Linus Torvalds , Dan Carpenter , David Gibson On Mon, 2012-07-02 at 13:41 +1000, Alexey Kardashevskiy wrote: > On 27/06/12 22:37, Dan Carpenter wrote: > > On Mon, Jun 25, 2012 at 10:55:52PM -0600, Alex Williamson wrote: > >> Hi, > >> > >> VFIO has been kicking around for well over a year now and has been > >> posted numerous times for review. The pre-requirements are finally > >> available in linux-next (or will be in the 20120626 build) so I'd like > >> to request a new branch be included in linux-next with a goal of being > >> accepted into v3.6. > >> > > > > Could you run Sparse over the driver? > > http://lwn.net/Articles/205624/ > > > > It reports a bunch of endian problems. Some are definitely bugs > > like: > > *prev |= cpu_to_le32((u32)epos << 20); > > > What is wrong here? I believe the only thing wrong here was that prev was a u32* instead of a __le32*. The new version in my tree has much better endian annotation after going through all the sparse errors. The only bug I found in the cleanup was the handling of rbar. It was missing the le32_to_cpu as we copied it out of vconfig. This is later used with pci_user_write_config_dword, so it needs to be in native endian. Thanks, Alex