qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	patches@linaro.org, "Michael S. Tsirkin" <mst@redhat.com>,
	"Will Deacon" <will.deacon@arm.com>,
	qemu-devel@nongnu.org, "Paul Brook" <paul@codesourcery.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v4 00/11] Fix versatile_pci
Date: Mon, 08 Apr 2013 12:37:46 -0500	[thread overview]
Message-ID: <1365442666.18069.50@driftwood> (raw)
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)

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  
many years.

I build system images that are working on versatilePB right now, with  
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  
within which you can compile hello world.

The kernel guys have screwed this up three consecutive times, as  
described here:

   http://landley.net/hg/aboriginal/rev/7bf850767bb8

Because as far as I can tell, nobody has any test hardware for this  
anymore. (But no other board emulation I've tried lets me stick a PCI  
bus and a scsi controller, ethernet, and serial port into an arm board  
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  
the old images, and require a very new qemu to run the new images, so  
there will be an incompatible flag day.

This is especially a concern for me because I had to go back to qemu  
1.2.0 to get stable builds on all my targets, because the 1.3.0 and  
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  
as many different platforms as I can get working, stuff tends to break.  
(The most recent target-specific one for me on the QEMU side was  
probably the powerpc video thing,
http://landley.net/notes-2012.html#17-11-2012 . Other than the 1.3/1.4  
general TCG instability which was the translation unit size being  
calculated wrong.) This is why I can't demand my users upgrade each  
time I do a release: the target they're interested in might not work  
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  
like I might have to patch my kernels to write the _old_ value to this  
register in order to get something that runs on old qemu? Because I  
broke my kernel to fit what qemu was doing, and I dunno when this  
register write changed. (I _do_ know that what the kernel guys have  
been doing to versatile is insane and inconsistent, and if you change  
your code to humor them they'll probably break it again. Their register  
mapping in 3.8 was so wrong even _I_ could tell.)

Rob

  parent reply	other threads:[~2013-04-08 18:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-06 15:44 [Qemu-devel] [PATCH v4 00/11] Fix versatile_pci Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 01/11] versatile_pci: Fix hardcoded tabs Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 02/11] versatile_pci: Expose PCI I/O region on Versatile PB Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 03/11] versatile_pci: Update to realize and instance init functions Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 04/11] versatile_pci: Change to subclassing TYPE_PCI_HOST_BRIDGE Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 05/11] versatile_pci: Use separate PCI I/O space rather than system I/O space Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 06/11] versatile_pci: Put the host bridge PCI device at slot 29 Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 07/11] versatile_pci: Implement the correct PCI IRQ mapping Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 08/11] versatile_pci: Implement the PCI controller's control registers Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 09/11] arm/realview: Fix mapping of PCI regions Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 10/11] versatile_pci: Expose PCI memory space to system Peter Maydell
2013-04-06 15:44 ` [Qemu-devel] [PATCH v4 11/11] hw/versatile_pci: Drop unnecessary vpb_pci_config_addr() Peter Maydell
2013-04-08 17:37 ` Rob Landley [this message]
2013-04-08 20:16   ` [Qemu-devel] [PATCH v4 00/11] Fix versatile_pci Peter Maydell
2013-06-28  7:01     ` Rob Landley
2013-06-29 11:03       ` Peter Maydell
2013-07-08  6:43         ` Rob Landley
2013-07-08  7:46           ` Peter Maydell
2013-07-05 11:26       ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365442666.18069.50@driftwood \
    --to=rob@landley.net \
    --cc=afaerber@suse.de \
    --cc=arnd@arndb.de \
    --cc=mst@redhat.com \
    --cc=patches@linaro.org \
    --cc=paul@codesourcery.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).