qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] issue with vgabios lfb and virtio vga
@ 2013-12-11 23:51 Dave Airlie
  2013-12-12  8:17 ` Gerd Hoffmann
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2013-12-11 23:51 UTC (permalink / raw)
  To: qemu-devel@nongnu.org, Gerd Hoffmann

Hi Gerd,

so I have a bit of a conflict I'm not sure how best to handle between
how vgabios.c locates its LFB and how virtio requires the BAR get laid
out.

So virtio-pci requires the BARs are laid out for MSI support with the
config i/o ports at BAR 0, and MSI BAR at BAR 1.

Now the vgabios.c does a check of bar 0 and bar 1 to see if they are
0xfff1 masked, this protects against the the i/o bar but fails to
protect against the LFB one as PCI BARs don't encode the size just the
base address, and a 4k BAR can be aligned to a larger size.

So even if I expand the vgabios.c current code to check for a
potential BAR2 it'll fail if the BAR1 gets aligned to something better
than the 4k is requires.

The correct way to size BARs is to store the old value, write
0xffffffff and see how many bits stick, then write back the old value.

Any ideas? I seem to remember vgabios.c had a hack in the past for
vmware, but I'm not sure.

Dave.

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

end of thread, other threads:[~2013-12-13  7:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 23:51 [Qemu-devel] issue with vgabios lfb and virtio vga Dave Airlie
2013-12-12  8:17 ` Gerd Hoffmann
2013-12-13  1:58   ` Dave Airlie
2013-12-13  7:06     ` Gerd Hoffmann

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