On 23.09.14 22:24, Benjamin Herrenschmidt wrote: > On Tue, 2014-09-23 at 14:30 +0200, Gerd Hoffmann wrote: >> Hi, > > (Adding Mike) > >> Series applies on top of the vga patches posted yesterday. >> It adds a mmio register to the pci stdvga cards allowing >> to switch framebuffer endiannness. Ben's patches 1+2 prepare >> for runtime-swicthable endianness and patch #3 actually >> implements the new register. It has been placed in a new >> range to avoid conflicts in case the bochs dispi interface >> will be extended in the future. The separate range also >> makes it easier to turn off on old machine types. > > Thanks. I'll try to produce patches for offb and bochsdrmfb to > adjust endianness & test some time this week or next week. > > Now the remaining point of contention is the "auto switch" > functionality which, sadly, is needed for existing LE guests to work > properly. > > I understand the reticence, on the other hand, our "pseries" machine is > really a paravirtualized environment where qemu implements the > hypervisor hcall interface, so in that context, it does make some sense > that the "hypervisor" affects some HW configuration/state on endian > switch (which is such an hcall). > > The problem is how to do that in a reasonably clean way from an > implementation perspective. > > The patch at > https://github.com/ozbenh/qemu/commit/778c92cebcd12fdafd2050dc4d7ca2521c462e46 > is one attempt to do it, for whatever it's worth, but I'm open to > alternatives.
Apart from stylistic problems I think the approach is reasonable. The only alternative I could think of would be to simply loop through every device in the device tree we can find and search for VGA objects. Alex