qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 9/9] [hack] virtio-gpu: maskerade as -device VGA
Date: Fri, 13 Mar 2015 10:47:13 +0100	[thread overview]
Message-ID: <1426240033-24673-11-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1426240033-24673-1-git-send-email-kraxel@redhat.com>

Newer libvirt versions start looking up VGA in the QOM tree.
So tricking libvirt this way ...

    <qemu:arg value='-set'/>
    <qemu:arg value='device.video0.driver=virtio-vga'/>

... to test virtio-vga stopped working.

Lets rename VGA to stdvga and virtio-vga to VGA to get things going
again.  A simple ...

      <model type='vga' vram='16384' heads='1'/>

... will give you virtio-vga when building qemu with this patch applied.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/vga-pci.c    | 2 +-
 hw/display/virtio-vga.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index aabfc23..8ed1ebd 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -349,7 +349,7 @@ static void secondary_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo vga_info = {
-    .name          = "VGA",
+    .name          = "stdvga",
     .parent        = TYPE_PCI_DEVICE,
     .instance_init = pci_std_vga_init,
     .instance_size = sizeof(PCIVGAState),
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index bbde750..ded28c1 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -7,7 +7,7 @@
 /*
  * virtio-vga: This extends VirtioPCIProxy.
  */
-#define TYPE_VIRTIO_VGA "virtio-vga"
+#define TYPE_VIRTIO_VGA "VGA"
 #define VIRTIO_VGA(obj) \
         OBJECT_CHECK(VirtIOVGA, (obj), TYPE_VIRTIO_VGA)
 
@@ -15,6 +15,7 @@ typedef struct VirtIOVGA {
     VirtIOPCIProxy parent_obj;
     VirtIOGPU      vdev;
     VGACommonState vga;
+    uint32_t       dummy;
 } VirtIOVGA;
 
 static void virtio_vga_invalidate_display(void *opaque)
@@ -108,6 +109,7 @@ static void virtio_vga_reset(DeviceState *dev)
 static Property virtio_vga_properties[] = {
     DEFINE_VIRTIO_GPU_PROPERTIES(VirtIOVGA, vdev.conf),
     DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
+    DEFINE_PROP_UINT32("vgamem_mb", VirtIOVGA, dummy, 16),
     DEFINE_PROP_END_OF_LIST(),
 };
 
-- 
1.8.3.1

  parent reply	other threads:[~2015-03-13  9:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13  9:47 [Qemu-devel] [PATCH 0/9] add virtio-gpu with 2d support Gerd Hoffmann
2015-03-13  9:47 ` [Qemu-devel] [PATCH] opengl: require glx Gerd Hoffmann
2015-03-13 10:31   ` Gerd Hoffmann
2015-03-13  9:47 ` [Qemu-devel] [PATCH 1/9] virtio-gpu/2d: add hardware spec include file Gerd Hoffmann
2015-03-16 16:20   ` Max Reitz
2015-03-17  7:54     ` Gerd Hoffmann
2015-03-13  9:47 ` [Qemu-devel] [PATCH 2/9] virtio-gpu/2d: add virtio gpu core code Gerd Hoffmann
2015-03-16 18:28   ` Max Reitz
2015-03-16 20:15   ` Max Reitz
2015-03-17  8:21     ` Gerd Hoffmann
2015-03-13  9:47 ` [Qemu-devel] [PATCH 3/9] virtio-gpu-pci: add virtio pci support Gerd Hoffmann
2015-03-16 18:49   ` Max Reitz
2015-03-13  9:47 ` [Qemu-devel] [PATCH 4/9] virtio-vga: add virtio gpu device with vga compatibility Gerd Hoffmann
2015-03-16 19:17   ` Max Reitz
2015-03-13  9:47 ` [Qemu-devel] [PATCH 5/9] virtio-vga: add '-vga virtio' support Gerd Hoffmann
2015-03-16 19:30   ` Max Reitz
2015-03-13  9:47 ` [Qemu-devel] [PATCH 6/9] virtio-vga: add vgabios configuration Gerd Hoffmann
2015-03-16 19:38   ` Max Reitz
2015-03-13  9:47 ` [Qemu-devel] [PATCH 7/9] virtio-vga: add vgabios binary Gerd Hoffmann
2015-03-16 19:39   ` Max Reitz
2015-03-13  9:47 ` [Qemu-devel] [PATCH 8/9] virtio-gpu: add to display-vga test Gerd Hoffmann
2015-03-16 17:16   ` Paolo Bonzini
2015-03-17  8:25     ` Gerd Hoffmann
2015-03-13  9:47 ` Gerd Hoffmann [this message]
2015-03-23 20:19 ` [Qemu-devel] [PATCH 0/9] add virtio-gpu with 2d support Christopher Covington

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=1426240033-24673-11-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=mst@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).