qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Alon Levy <alevy@redhat.com>
Cc: qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>,
	"Avi Kivity" <avi@redhat.com>
Subject: Re: [Qemu-devel] Cirrus bugs vs endian: how two bugs cancel each other out
Date: Fri, 03 Aug 2012 08:41:36 -0500	[thread overview]
Message-ID: <87boism6sv.fsf@codemonkey.ws> (raw)
In-Reply-To: <20120803064532.GR29361@garlic.redhat.com>

Alon Levy <alevy@redhat.com> writes:

> On Wed, Aug 01, 2012 at 02:22:37PM -0500, Anthony Liguori wrote:
>> Andreas Färber <afaerber@suse.de> writes:
>> 
>> > Am 30.07.2012 18:19, schrieb Alon Levy:
>> >> On Mon, Jul 30, 2012 at 09:54:27PM +1000, Benjamin Herrenschmidt wrote:
>> >>> On Mon, 2012-07-30 at 14:25 +0300, Avi Kivity wrote:
>> >>>
>> >>>> [...] why not go all the way to qxl?
>> >>>>
>> >>>> That will give you better graphics performance with no need to hack.
>> >>>
>> >>> Well, qxl is pretty awful from what I can see so far. [...]
>> >> 
>> >> I would love to hear something more specific about this. I assume you
>> >> are talking about libspice-server and not the device itself, since the
>> >> device itself has nothing specifically matching windows.
>> >
>> > I can't comment on what Ben meant, but from my perspective the really
>> > awful thing about SPICE was its huge tree of dependencies, including a
>> > very specific version of celt that we now need to package and maintain
>> > specifically for SPICE. At least during the big QOM refactorings.
>> 
>> Ack.
>> 
>> This is why I've been advocating for a new PV device model that can
>> negotiation in full SPICE support.
>> 
>> Then we could keep libspice an optional dependency, but move all guests
>> to use a single graphics driver.  Likewise, management tools wouldn't
>> need to worry about multiple types of graphics cards.
>
> This sounds great, but how would that negotiation work? Do you intend
> for a VGA device (i.e. pci vendor & product id's of cirrus) that is also
> a virtio device and a guest driver will recognize this by poking some io
> ports or looking at another pci field?

It would be an VGA/SVGA/VESA/VBE compatible virtio-pci device.  If we
take virtio-pci, do vga_init_common, set the class codes correctly, 
move the vram bar from 0->1 and update the VGA BIOS accordingly, it Just
Works.

With no feature bits negotiated, this is all you get--a plain VESA
compatible interface.

We would then add feature bits to allow you to do basic operations like
setting display mode, damage update, and perhaps some 2d acceleration
like blit.  This all happens through messages on a virtqueue.

While this is totally virtio-pci ABI compatible, we'll need to enhance
the virtio API within Linux to allow the notion of "map large memory
region."  It's not entirely clear to me yet how to do this only because
non-PCI transports probably need this memory to be guest allocated.
It's possible that we could add another vring type abstraction layer to
handle this difference.

Anyway, we would then add additional feature bits to things like Spice.
It's not clear to me yet how this would work in detail (I don't know
enough about Spice).  The easiest thing to do is simply introduce a
dedicated virtqueue for Spice and speak exactly the same protocol that
QXL does today.

The trouble with that though is that some of the things in QXL today
probably overlap with features we want if libspice is not available
(like mode setting).

So if it's reasonable, it would be best to negotiate in Spice
feature-by-feature using Spice command format where it makes sense and
something more generic where it makes sense.

QEMU would have to fully decode these commands and hand off the results
to libspice if it was there.

So in QEMU, if libspice is present, QEMU would decode all commands and
hand them to libspice in a form it understands (this may require some
hopefully trivial mapping for things like mode setting).  If libspice
isn't present, QEMU only exposes the features it can handle on its own.

This should give us the best of all worlds.  A legacy VGA compatible
interface that speaks virtio, works on non-PCI architectures, and has
the full capabilities of Spice (with the ability to fallback if libspice
isn't present).

Regards,

Anthony Liguori

>
>> 
>> Regards,
>> 
>> Anthony Liguori
>> 
>> >
>> > Elsewhere QEMU is built around the principle of opting individual
>> > features in rather than requiring a whole bunch of stuff just to do a
>> > basic qxl compile test for patches.
>> >
>> > Andreas
>> >
>> > -- 
>> > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
>> > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>> 

  reply	other threads:[~2012-08-03 13:41 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=87boism6sv.fsf@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=afaerber@suse.de \
    --cc=alevy@redhat.com \
    --cc=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).