From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWWmM-000779-Dw for qemu-devel@nongnu.org; Tue, 23 Sep 2014 16:33:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWWmG-0001yh-DS for qemu-devel@nongnu.org; Tue, 23 Sep 2014 16:33:42 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57724 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWWmG-0001xh-7Z for qemu-devel@nongnu.org; Tue, 23 Sep 2014 16:33:36 -0400 Message-ID: <5421D919.8080209@suse.de> Date: Tue, 23 Sep 2014 22:33:29 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1411475457-10942-1-git-send-email-kraxel@redhat.com> <1411503873.4184.24.camel@pasglop> In-Reply-To: <1411503873.4184.24.camel@pasglop> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/3] vga: add endianness switching support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt , Gerd Hoffmann Cc: David Gibson , Alexey Kardashevskiy , qemu-devel@nongnu.org, Michael Roth 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