Received: from [140.186.70.92] (port=37187 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkgiW-0000sm-O2 for qemu-devel@nongnu.org; Wed, 02 Feb 2011 12:42:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pkgdp-0007uk-Ns for qemu-devel@nongnu.org; Wed, 02 Feb 2011 12:37:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pkgdp-0007u9-G7 for qemu-devel@nongnu.org; Wed, 02 Feb 2011 12:37:17 -0500 Date: Wed, 2 Feb 2011 15:37:11 -0200 From: Eduardo Habkost Message-ID: <20110202173711.GH12903@otherpad.lan.raisama.net> References: <1296579203-21083-1-git-send-email-ehabkost@redhat.com> <4D490DE2.6070806@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 0/4] fix/add CONFIG_* options for VMWare device emulation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Paolo Bonzini , qemu-devel@nongnu.org, Juan Quintela On Wed, Feb 02, 2011 at 05:16:23PM +0000, Blue Swirl wrote: > On Wed, Feb 2, 2011 at 7:55 AM, Paolo Bonzini wro= te: > > On 02/01/2011 07:10 PM, Blue Swirl wrote: > >> > >> One way to solve this which would preserve the device model would be > >> to add stub devices. For example, hw/vmmouse-stub.c would be: > >> void *vmmouse_init(void *m) > >> { > >> =A0 =A0 return NULL; > >> } > > > > This is the wrong direction, unless you can somehow automatically gen= erate > > the stub file. > > > > The only other solution I can think of is weak symbols. =A0There are = subtle > > differences between Windows and Linux weak symbols, but luckily we do= not > > care about it. =A0See http://cygwin.com/ml/cygwin/2010-04/msg00281.ht= ml >=20 > Boards should create optional devices so that failure in the device > creation is handled more intelligently. For example, pci_vmsvga_init() > is just a wrapper (a bit useless one also) to pci_create_simple(bus, > -1, "vmware-svga"). pci_create_simple() in turn uses > qdev_init_nofail() which aborts if the device can't be created. > Instead, non-aborting version should be used so that if 'vmware-svga' > device can't be initialized, a fallback device (VGA) could be used or > error message printed. >=20 > In this case, vmmouse and vmport are not converted to qdev but that > should be done anyway. In the meantime, what should we do? Keep the CONFIG_VMWARE_VGA option broken and useless just to avoid an #ifdef? --=20 Eduardo