From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqB4-0001BO-T6 for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPqB3-0007Ne-Ob for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqB3-0007NC-G4 for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:23:49 -0500 From: Gerd Hoffmann Date: Mon, 23 Feb 2015 11:23:31 +0100 Message-Id: <1424687012-18524-16-git-send-email-kraxel@redhat.com> In-Reply-To: <1424687012-18524-1-git-send-email-kraxel@redhat.com> References: <1424687012-18524-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [RfC PATCH 15/15] [hack] virtio-gpu: maskerade as -device VGA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori , "Michael S. Tsirkin" Newer libvirt versions start looking up VGA in the QOM tree. So tricking libvirt this way ... ... to test virtio-vga stopped working. Lets rename VGA to stdvga and virtio-vga to VGA to get things going again. A simple ... ... will give you virtio-vga when building qemu with this patch applied. Signed-off-by: Gerd Hoffmann --- 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 53739e4..6a1b32d 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -325,7 +325,7 @@ static void secondary_class_init(ObjectClass *klass, void *data) } static const TypeInfo vga_info = { - .name = "VGA", + .name = "stdvga", .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIVGAState), .class_init = vga_class_init, diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 0e48ba9..57e25db 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) @@ -114,6 +115,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