qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Cirrus bugs vs endian: how two bugs cancel each other out
@ 2012-07-30  6:24 Benjamin Herrenschmidt
  2012-07-30 10:08 ` Avi Kivity
                   ` (2 more replies)
  0 siblings, 3 replies; 55+ messages in thread
From: Benjamin Herrenschmidt @ 2012-07-30  6:24 UTC (permalink / raw)
  To: qemu-devel

So I got cirrus working on ppc with cirrusdrmfb...

The fun part is that it works :-)

Basically, the issue is that normally, for it to work, one would have to
access the framebuffer using the appropriate aperture for byteswapping
based on the bpp.

However, qemu doesn't emulate those apertures ... and cirrusdrmfb
either.

In fact, qemu cirrus model is just dumb and assumes guest native
byteorder for the framebuffer.

The good thing is that this makes it work... the bad thing is that it's
a completely incorrect HW model and if the linux driver wasn't also
buggy it wouldn't work.

However it's also pretty much unfixable without making it also unusable
in terms of performance so I want to check with you guys if it's ok to
just leave it as-is.

Basically, if the fb was LE as it's supposed to be, one would have to
use the byteswapped apertures. But those can only be emulated by
trapping on every access to turn it into MMIO emulation, which means
unusable performances.

So we end up with what is effectively a BE framebuffer thanks to qemu
hard coding what it thinks the guest endian is (btw, this is quite
busted in theory as well since PPC can be bi-endian for example).

Anyways, it works today, it's just that the HW model is wrong... and I
don't want to fix it. Any objection ?

As for the work I'm doing to brush up pci-vga a bit, I'm tempted to add
an MMIO reg or a VBE config reg bit to allow configuring the endianness
of the underlying fb with a default to what qemu does today.

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2012-08-09  6:17 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-30  6:24 [Qemu-devel] Cirrus bugs vs endian: how two bugs cancel each other out Benjamin Herrenschmidt
2012-07-30 10:08 ` Avi Kivity
2012-07-30 11:20   ` Benjamin Herrenschmidt
2012-07-30 11:25     ` Avi Kivity
2012-07-30 11:54       ` Benjamin Herrenschmidt
2012-07-30 11:58         ` Avi Kivity
2012-07-30 12:08           ` Benjamin Herrenschmidt
2012-07-30 12:15             ` Avi Kivity
2012-07-30 12:23               ` Benjamin Herrenschmidt
2012-07-30 16:24             ` Alon Levy
2012-07-30 20:19               ` Anthony Liguori
2012-07-30 22:24               ` Benjamin Herrenschmidt
2012-07-31  8:10                 ` Alon Levy
2012-08-01 14:35                 ` Avi Kivity
2012-08-06 12:57             ` Gerd Hoffmann
2012-07-30 13:18           ` Anthony Liguori
2012-07-30 13:30             ` Avi Kivity
2012-07-30 13:45               ` Anthony Liguori
2012-07-30 13:55                 ` Avi Kivity
2012-07-30 14:29                   ` Anthony Liguori
2012-07-30 14:36                     ` Avi Kivity
2012-07-30 16:01                       ` Anthony Liguori
2012-07-30 23:47                         ` Rusty Russell
2012-07-31  3:16                           ` Benjamin Herrenschmidt
2012-08-06 14:02                             ` Gerd Hoffmann
2012-08-06 21:13                               ` Benjamin Herrenschmidt
2012-08-01 23:29                         ` Andreas Färber
2012-08-06 13:47                         ` Gerd Hoffmann
2012-08-06 14:35                           ` Anthony Liguori
2012-07-31  8:20                     ` Alon Levy
2012-07-30 22:15                   ` Benjamin Herrenschmidt
2012-07-31  0:17                     ` Anthony Liguori
2012-07-31  3:26                       ` Benjamin Herrenschmidt
2012-08-06 13:20             ` Gerd Hoffmann
2012-08-06 21:16               ` Benjamin Herrenschmidt
2012-08-07  5:30                 ` Gerd Hoffmann
2012-08-07  6:07                   ` Benjamin Herrenschmidt
2012-07-30 16:19         ` Alon Levy
2012-08-01 15:42           ` Andreas Färber
2012-08-01 19:22             ` Anthony Liguori
2012-08-03  6:45               ` Alon Levy
2012-08-03 13:41                 ` Anthony Liguori
2012-08-07  7:00                   ` Alon Levy
2012-08-07  8:01                     ` Gerd Hoffmann
2012-08-07 13:05                       ` Erlon Cruz
2012-08-07 14:07                         ` Gerd Hoffmann
2012-08-07 19:43                           ` Erlon Cruz
2012-08-08  6:18                             ` Gerd Hoffmann
2012-08-08 14:14                               ` Erlon Cruz
2012-08-09  6:17                                 ` Gerd Hoffmann
2012-07-30 15:18 ` Blue Swirl
2012-07-30 15:30   ` Peter Maydell
2012-07-30 15:44     ` Blue Swirl
2012-07-31  8:44 ` ronnie sahlberg
2012-07-31 10:30   ` Benjamin Herrenschmidt

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).