qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Erlon Cruz <erlon.cruz@br.flextronics.com>
Cc: alevy@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Implementing qxl-virtio on QEMU
Date: Tue, 11 Sep 2012 12:28:33 +0200	[thread overview]
Message-ID: <504F1251.101@redhat.com> (raw)
In-Reply-To: <503B0EF3.20407@redhat.com>

On 08/27/12 08:08, Gerd Hoffmann wrote:
> On 08/24/12 21:14, Erlon Cruz wrote:
>> The following patches makes provides video support to non PCI architectures, please review!
> 
> Can you give an overview on the virtio-qxl virtual hardware design?

Self-reply-ing.  There is a paper on it (got link @ irc):

http://www.rachacuca.org/~fidencio/VirtioQXL%20-%20a%20virtio%20video%20device%20for%20para%20virtualized%20KVM%20guests.pdf

Well.  The design is *way* too close to the original, non-virtio qxl
device.  The reason is code reuse according to the paper.  I think it
would be *much* better to just take a fresh start.  Reasons:

First the qxl device carries a bunch of legacy stuff for compatibility
with old guests & guest drivers.  When designing a new device I'd like
to throw away as much as possible of this stuff.

Second you'll need a kernel driver to drive the virtio queues.  The
linux graphics world is moving to kernel drivers (aka kms) anyway, so
this shouldn't be a big issue.  You'll also get a framebuffer console
then, so you can see the linux boot messages quite early.  That is a
nice thing, especially without vga compatibility.

More hints:

On memory management:  spice does *not* require device memory.  spice
has "memory slots".  They are a thin layer to allow the spice server
library dereference pointers in qxl commands.  qxl allows guests to
register memory slots for the qxl device memory.  That is a qxl
restriction though, not a spice restriction.  Letting the virtio-qxl kms
driver allocate a big memory block at boot, then register that as memory
slot and store qxl commands, cmd data + surfaces there is no problem,
spice server can handle that just fine.  No copying needed.
You could also setup memory slot(s) for *all* guest ram, then kmalloc()
memory as needed.

Don't use spice rings at all.  Use virtio rings instead.  I think we
need these:

  (1) spice rendering commands (replaces QXLCommandRing).
  (2) spice cursor commands (replaces QXLCursorRing).
  (3) resource release (replaces QXLReleaseRing).
  (4) device setup ring (replace QXL_IO_*).
  (5) device event ring (spice server notifications go here,
                         replacing QXL_INTERRUPT_*).

Don't use QXLRom.  The mode table in qxlrom is historical baggage anyway
and should be dropped.  Most of the other stuff is related to the qxl
device too and can be dropped.  Anything remaining can be queried by the
guest using a virtio request on the device setup ring.

Don't use QXLRam.  Arguments for QXL_IO_* ops are there, this can be
stuffed into the virtio request buffer instead.

cheers,
  Gerd

      reply	other threads:[~2012-09-11 10:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 19:14 [Qemu-devel] Implementing qxl-virtio on QEMU Erlon Cruz
2012-08-24 19:14 ` [Qemu-devel] [PATCH 1/4] qxl: create a qxl common struct! Erlon Cruz
2012-08-27  5:51   ` Gerd Hoffmann
2012-08-24 19:14 ` [Qemu-devel] [PATCH 2/4] qxl: split qxl functions in common and pci files Erlon Cruz
2012-08-27  6:05   ` Gerd Hoffmann
2012-08-24 19:14 ` [Qemu-devel] [PATCH 3/4] qxl: implement VirtIO QXL (dummy) device support Erlon Cruz
2012-08-24 19:14 ` [Qemu-devel] [PATCH 4/4] qxl: introducing virtio-qxl Erlon Cruz
2012-08-27  6:08   ` Gerd Hoffmann
2012-08-27  6:08 ` [Qemu-devel] Implementing qxl-virtio on QEMU Gerd Hoffmann
2012-09-11 10:28   ` Gerd Hoffmann [this message]

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=504F1251.101@redhat.com \
    --to=kraxel@redhat.com \
    --cc=alevy@redhat.com \
    --cc=erlon.cruz@br.flextronics.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).