From patchwork Mon Feb 23 10:23:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 442406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 534F5140111 for ; Mon, 23 Feb 2015 21:27:09 +1100 (AEDT) Received: from localhost ([::1]:42865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqEF-000785-5y for incoming@patchwork.ozlabs.org; Mon, 23 Feb 2015 05:27:07 -0500 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 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1NANmaW006330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 23 Feb 2015 05:23:48 -0500 Received: from nilsson.home.kraxel.org (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1NANixr015788; Mon, 23 Feb 2015 05:23:47 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 7EC4182CBB; Mon, 23 Feb 2015 11:23:36 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , Anthony Liguori , "Michael S. Tsirkin" Subject: [Qemu-devel] [RfC PATCH 15/15] [hack] virtio-gpu: maskerade as -device VGA X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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(), };