From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWMBq-0003Mn-E4 for qemu-devel@nongnu.org; Fri, 13 Mar 2015 05:47:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWMBk-0000q9-5b for qemu-devel@nongnu.org; Fri, 13 Mar 2015 05:47:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWMBj-0000pa-TW for qemu-devel@nongnu.org; Fri, 13 Mar 2015 05:47:28 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2D9lRgn008560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 13 Mar 2015 05:47:27 -0400 From: Gerd Hoffmann Date: Fri, 13 Mar 2015 10:47:13 +0100 Message-Id: <1426240033-24673-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1426240033-24673-1-git-send-email-kraxel@redhat.com> References: <1426240033-24673-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 9/9] [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 , "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 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