Received: from eggs.gnu.org ([208.118.235.92]:49806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPGWb-00037i-R5 for qemu-devel@nongnu.org; Mon, 08 Apr 2013 14:10:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPGWa-0004Yz-3Z for qemu-devel@nongnu.org; Mon, 08 Apr 2013 14:10:37 -0400 Received: from mail-ia0-x234.google.com ([2607:f8b0:4001:c02::234]:63116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPGWZ-0004Ya-US for qemu-devel@nongnu.org; Mon, 08 Apr 2013 14:10:35 -0400 Received: by mail-ia0-f180.google.com with SMTP id l29so168605iag.11 for ; Mon, 08 Apr 2013 11:10:34 -0700 (PDT) Date: Mon, 08 Apr 2013 12:37:46 -0500 From: Rob Landley In-Reply-To: <1365263076-16909-1-git-send-email-peter.maydell@linaro.org> (from peter.maydell@linaro.org on Sat Apr 6 10:44:25 2013) Message-Id: <1365442666.18069.50@driftwood> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 00/11] Fix versatile_pci List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Arnd Bergmann , patches@linaro.org, "Michael S. Tsirkin" , Will Deacon , qemu-devel@nongnu.org, Paul Brook , Andreas =?iso-8859-1?q?F=E4rber?= On 04/06/2013 10:44:25 AM, Peter Maydell wrote: > This patch series fixes a number of serious bugs in our emulation of > the PCI controller found on VersatilePB and the early Realview boards: > * our interrupt mapping was totally wrong Yes. Yes it was. However, what you were doing matched the kernel for =20 many years. I build system images that are working on versatilePB right now, with =20 the 3.8 kernel. http://landley.net/aboriginal/bin/system-image-armv5l.tar.bz2 Grab that, ./run-emulator.sh and it should boot to a shell prompt =20 within which you can compile hello world. The kernel guys have screwed this up three consecutive times, as =20 described here: http://landley.net/hg/aboriginal/rev/7bf850767bb8 Because as far as I can tell, nobody has any test hardware for this =20 anymore. (But no other board emulation I've tried lets me stick a PCI =20 bus and a scsi controller, ethernet, and serial port into an arm board =20 along with enough memory to natively compile stuff.) This past release I tried to fix it up properly: http://landley.net/notes.html#15-03-2013 http://landley.net/notes.html#16-03-2013 And then I gave up and hit it with a rock: http://landley.net/hg/aboriginal/rev/96fb8598a446 > This version of the patchset avoids breaking legacy Linux guests > by automatically detecting those broken kernels and switching back > to the old mapping. This works by looking at the values the kernel > writes to the PCI_INTERRUPT_LINE register in the config space, which > is effectively the interrupt number the kernel expects the device > to be using. If this doesn't match reality we use the broken mapping. > (Thanks to Michael S. Tsirkin for this suggestion.) My concern here was that you'd going to change qemu so it doesn't run =20 the old images, and require a very new qemu to run the new images, so =20 there will be an incompatible flag day. This is especially a concern for me because I had to go back to qemu =20 1.2.0 to get stable builds on all my targets, because the 1.3.0 and =20 1.4.0 releases were both broken: http://landley.net/aboriginal/news.html Yay improving the latest and greatest, but when I'm regression testing =20 as many different platforms as I can get working, stuff tends to break. =20 (The most recent target-specific one for me on the QEMU side was =20 probably the powerpc video thing, http://landley.net/notes-2012.html#17-11-2012 . Other than the 1.3/1.4 =20 general TCG instability which was the translation unit size being =20 calculated wrong.) This is why I can't demand my users upgrade each =20 time I do a release: the target they're interested in might not work =20 because my images depend on things you don't regression test much. I'm glad to see you're addressing backwards compatability, but it looks =20 like I might have to patch my kernels to write the _old_ value to this =20 register in order to get something that runs on old qemu? Because I =20 broke my kernel to fit what qemu was doing, and I dunno when this =20 register write changed. (I _do_ know that what the kernel guys have =20 been doing to versatile is insane and inconsistent, and if you change =20 your code to humor them they'll probably break it again. Their register =20 mapping in 3.8 was so wrong even _I_ could tell.) Rob=