From patchwork Mon Nov 19 13:11:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Larsson X-Patchwork-Id: 200048 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A9EAD2C0081 for ; Tue, 20 Nov 2012 03:54:23 +1100 (EST) Received: from localhost ([::1]:48418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaUc1-0005iH-GC for incoming@patchwork.ozlabs.org; Mon, 19 Nov 2012 11:54:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaR8q-0004UI-BE for qemu-devel@nongnu.org; Mon, 19 Nov 2012 08:12:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaR8n-0001zM-9T for qemu-devel@nongnu.org; Mon, 19 Nov 2012 08:12:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaR8n-0001zD-21 for qemu-devel@nongnu.org; Mon, 19 Nov 2012 08:11:57 -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 qAJDBt6w009424 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 19 Nov 2012 08:11:55 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAJDBs2W017525; Mon, 19 Nov 2012 08:11:54 -0500 From: Alexander Larsson To: qemu-devel@nongnu.org Date: Mon, 19 Nov 2012 14:11:51 +0100 Message-Id: <1353330711-20207-1-git-send-email-alexl@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 X-Mailman-Approved-At: Mon, 19 Nov 2012 11:54:12 -0500 Cc: Alexander Larsson Subject: [Qemu-devel] [PATCH] qxl: Export "mode" as a property 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 This way you can easily tell from qemu if the guest is using a qxl driver or not. --- hw/qxl.c | 1 + hw/qxl.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/qxl.c b/hw/qxl.c index 1d16863..98af0bb 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -2261,6 +2261,7 @@ static Property qxl_properties[] = { DEFINE_PROP_UINT32("vram64_size_mb", PCIQXLDevice, vram_size_mb, -1), DEFINE_PROP_UINT32("vgamem_mb", PCIQXLDevice, vgamem_size_mb, 16), DEFINE_PROP_INT32("surfaces", PCIQXLDevice, ssd.num_surfaces, 1024), + DEFINE_PROP_UINT32("mode", PCIQXLDevice, mode, 0), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/qxl.h b/hw/qxl.h index e583cfb..c4414ba 100644 --- a/hw/qxl.h +++ b/hw/qxl.h @@ -34,7 +34,7 @@ typedef struct PCIQXLDevice { uint32_t guest_bug; - enum qxl_mode mode; + uint32_t mode; uint32_t cmdflags; int generation; uint32_t revision;