From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJkhB-00028s-3f for qemu-devel@nongnu.org; Tue, 19 Aug 2014 10:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJkh2-0003NA-17 for qemu-devel@nongnu.org; Tue, 19 Aug 2014 10:47:33 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:41057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJkh1-0003N2-RI for qemu-devel@nongnu.org; Tue, 19 Aug 2014 10:47:23 -0400 Received: by mail-wi0-f179.google.com with SMTP id f8so5425443wiw.6 for ; Tue, 19 Aug 2014 07:47:23 -0700 (PDT) Date: Tue, 19 Aug 2014 15:47:20 +0100 From: Stefan Hajnoczi Message-ID: <20140819144720.GA13680@stefanha-thinkpad.redhat.com> References: <1408119832-4354-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <1408119832-4354-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH] Revert "virtio_rng: replace custom backend API with UserCreatable.complete() callback" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: imammedo@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, aliguori@amazon.com, afaerber@suse.de --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 16, 2014 at 12:23:52AM +0800, Amos Kong wrote: > This reverts commit 57d3e1b3f52d07d215ed96df946ee01f8d9f9526. >=20 > The commit introduced a regression bug, the initialization order of virti= o-rng > backend was changed. >=20 > # x86_64-softmmu/qemu-system-x86_64 -monitor stdio -vnc :0 \ > -chardev socket,host=3Dlocalhost,port=3D1024,id=3Dchr0 \ > -object rng-egd,chardev=3Dchr0,id=3Drng0 >=20 > qemu-system-x86_64: -object rng-egd,chardev=3Dchr0,id=3Drng0: Device 'ch= r0' not found >=20 > Chardev 'chr0' isn't initialized when we try to open rng backend, More detail: The problem is that vl.c:main() calls object_create() on -object before -chardev options are processed. Moving the object_create() call after chardev is arbitrary and does not work if a chardev depends on an -object. It would have been nice to process command-line options in left-to-right order instead of grouping them by option type. I doubt we can change this now since it would break the command-line. > Conflicts: > hw/virtio/virtio-rng.c This shouldn't be here. I agree with reverting commit 57d3e1b3f52d07d215ed96df946ee01f8d9f9526. --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT82N4AAoJEJykq7OBq3PI5VsIAIr74Gt6xDcpXqe+pEP9PDCi /nBMtGDiNVPdbrw+KJgo2h1nWWo7RUOCSgDePDvGT5y9NSTGbLkC+VAcbmiPNmod O3jL98sVc+hNAXNm2062cy0WoCfuSwbNxIAFgZjoBn3DwMtfE+ztS9MYyYN7wjLz uP1obgExTc6BUfzF01r5WRhRIYglImM+5agmnLU4Ihdu5AtaNrXDloCtZtgx65Em rE2QVdcjUjge42ROjWUCr8XWMD/SKFXf5gWhTdeF9uXBmh9KzbyxBsEkwRCUTafo MhSmZmxLG9xX+RRBs1CGvd0AflCnEGM2WugllWHCc1eYrde2FyB1y8uqsUwrjsA= =4XIa -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--