From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8Kng-0006Zt-7d for qemu-devel@nongnu.org; Wed, 11 Nov 2009 16:32:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8Kne-0006Xr-B4 for qemu-devel@nongnu.org; Wed, 11 Nov 2009 16:32:23 -0500 Received: from [199.232.76.173] (port=44678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8Kne-0006Xk-6H for qemu-devel@nongnu.org; Wed, 11 Nov 2009 16:32:22 -0500 Received: from bhuna.collabora.co.uk ([93.93.128.226]:52121) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N8Knd-00086r-TH for qemu-devel@nongnu.org; Wed, 11 Nov 2009 16:32:22 -0500 Received: from [192.168.1.64] (94-192-117-31.zone6.bethere.co.uk [94.192.117.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 7D0AD60034B for ; Wed, 11 Nov 2009 21:32:17 +0000 (GMT) Message-ID: <4AFB2D4D.8050208@collabora.co.uk> Date: Wed, 11 Nov 2009 21:31:57 +0000 From: Ian Molton MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] virtio-rng List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi folks, I'm writing a virtio-rng host-side driver for qemu-kvm, and I've got something up and running that works, and will pass data gathered from a char device on the host through to the virtio-rng driver on a guest copy of linux. Ultimately it'll get its entropy from egd as well, but for now I'd like to solve the issue in hw/qdev.c. in qdev_init_chardev() the return value is picked based upon the name of the device. For now, I've added a third 'if clause' to match for my driver and pass through the CharDriverState * fron vl.c for my rng driver, however I'd like to solve this properly. I think a simple name->pointer type matching system would work fine, however I'd like to know if anyone else has sorted this yet, or if I should be doing things differently altogether. also, what does '_hds' stand for? eg. 'virtcon_hds'[] Thanks, - -Ian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJK+y1LAAoJEFIjE1w7L6YHlI4P/i4QPbsIASmCLtI9RiEtF7LF NguXv+HCNme8MK6bQpHKLYIJ1q/DSImeeJPjqe/PF1unOBP0d4GmsC+qnLGj4CZn LCRiqf+ZgVPI/fX8TQ8TOzN9o31EOnWmxOKuj+zDDhbRxG/mY2OzOQCLEBkQ26GL Pru981FBVJiEPP2JnWnR6Hn+IZaazcyo+ychk0UhQYasmv8XTC75DiiProhyXFJk TXa8UN+lWd1U1a0mmmg1gxttQrYZiC5i4+k609HY8v3poZ0kjmlH0hIUHt+3FHE8 pA1WL/B26EhNem3ZazGGJ8sNdGg60VTjEBSHyGveCdUtiQU2TWWESBOesQoALkoE 8mONeytgsv7GZ9sh0a1RTInvSsA2TyV/hzQphOtTl6SNEETlGEsFNJpLk+6GeO89 g5A3vdgsOL18ymWxDTf/Ts14mK4+QMa9x4T2Cpttip1LuOwDoV/PCKfpg1q9TT+d C04TFR7qgl6eAsErHhHlFYmWNcMHn00t9jOEBUTMjIi5xKwsCr+ktWxF0yxLQdlu co7gLZd4ck4N8GMltPjIXGMnqWLsemf4b7Gpg8wtIjmK5f7l58qVZW0Qsdx9ujJc MLxQwKvk5OdE+uGMBUDynAGW926Fu/QhdrAhWSbzDFrIjysTY6fzXgNaQa+8HoL9 5fB9UiotqwfYy95HnZV9 =ABHJ -----END PGP SIGNATURE-----