From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFUPF-0007p9-Lq for qemu-devel@nongnu.org; Sun, 16 Oct 2011 13:21:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFUP6-00016N-Dp for qemu-devel@nongnu.org; Sun, 16 Oct 2011 13:21:49 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:38107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFUP5-000168-U6 for qemu-devel@nongnu.org; Sun, 16 Oct 2011 13:21:40 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate01.web.de (Postfix) with ESMTP id B44D819D39919 for ; Sun, 16 Oct 2011 19:21:25 +0200 (CEST) Message-ID: <4E9B1292.2020703@web.de> Date: Sun, 16 Oct 2011 19:21:22 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4E917BAE.6020804@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1C64792DD76E6F461C3D68D7" Subject: Re: [Qemu-devel] [PATCH 1/3] vga: make PCI devices optional List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1C64792DD76E6F461C3D68D7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-10-16 18:45, Blue Swirl wrote: > On Sun, Oct 9, 2011 at 10:47 AM, Jan Kiszka wrote: >> On 2011-10-09 12:22, Blue Swirl wrote: >>> Signed-off-by: Blue Swirl >>> --- >>> hw/cirrus_vga.c | 5 ----- >>> hw/pc.c | 6 +++++- >>> hw/pc.h | 26 ++++++++++++++++++++++++-- >>> hw/pci.c | 18 ++++++++++++++++++ >>> hw/pci.h | 4 ++++ >>> hw/vga-pci.c | 6 ------ >>> 6 files changed, 51 insertions(+), 14 deletions(-) >>> >>> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c >>> index c7e365b..a11444c 100644 >>> --- a/hw/cirrus_vga.c >>> +++ b/hw/cirrus_vga.c >>> @@ -2955,11 +2955,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *de= v) >>> return 0; >>> } >>> >>> -void pci_cirrus_vga_init(PCIBus *bus) >>> -{ >>> - pci_create_simple(bus, -1, "cirrus-vga"); >>> -} >>> - >>> static PCIDeviceInfo cirrus_vga_info =3D { >>> .qdev.name =3D "cirrus-vga", >>> .qdev.desc =3D "Cirrus CLGD 54xx VGA", >>> diff --git a/hw/pc.c b/hw/pc.c >>> index 203627d..97f93d4 100644 >>> --- a/hw/pc.c >>> +++ b/hw/pc.c >>> @@ -1068,7 +1068,11 @@ void pc_vga_init(PCIBus *pci_bus) >>> { >>> if (cirrus_vga_enabled) { >>> if (pci_bus) { >>> - pci_cirrus_vga_init(pci_bus); >>> + if (!pci_cirrus_vga_init(pci_bus)) { >>> + fprintf(stderr, "Warning: cirrus_vga not available,"= >>> + " using standard VGA instead\n"); >>> + pci_vga_init(pci_bus); >>> + } >> >> If you adjust the default vga interface in case cirrus is configured >> out, you can simply fail here. Would be more user-friendly, specifical= ly >> if the user actually specified -vga cirrus. >=20 > This matches how vmsvga is handled. Maybe the logic should be pushed > to vl.c where the -vga switch is handled instead. Definitely. This approach is creating too much boilerplate code. Jan --------------enig1C64792DD76E6F461C3D68D7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6bEpQACgkQitSsb3rl5xRm8wCgyQfNNcJiIKi5Szhfa1aQbMY7 OMIAnA1LjvqcdQ7DV2kcb3TfRBl2uOdm =73Z5 -----END PGP SIGNATURE----- --------------enig1C64792DD76E6F461C3D68D7--