Received: from eggs.gnu.org ([2001:4830:134:3::10]:59049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0Tu4-0004HN-HO for qemu-devel@nongnu.org; Tue, 07 Jan 2014 05:29:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0Ttw-0007LZ-TW for qemu-devel@nongnu.org; Tue, 07 Jan 2014 05:28:56 -0500 From: Markus Armbruster References: <1387904675-7962-1-git-send-email-afaerber@suse.de> <1387904675-7962-2-git-send-email-afaerber@suse.de> <20131224194337.GA15879@redhat.com> Date: Tue, 07 Jan 2014 11:28:26 +0100 In-Reply-To: <20131224194337.GA15879@redhat.com> (Michael S. Tsirkin's message of "Tue, 24 Dec 2013 21:43:37 +0200") Message-ID: <87a9f82iid.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL v2 01/24] qdev: Replace no_user by cannot_instantiate_with_device_add_yet List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , qemu-devel@nongnu.org, Alexander Graf , Andreas =?utf-8?Q?F=C3=A4rber?= , "Vassili Karpov (malc)" , Gerd Hoffmann , Anthony Liguori , Cornelia Huck , "open list:Old World" , Andreas =?utf-8?Q?F=C3=A4rber?= , Richard Henderson "Michael S. Tsirkin" writes: > On Tue, Dec 24, 2013 at 06:04:12PM +0100, Andreas F=C3=A4rber wrote: >> From: Markus Armbruster >>=20 >> In an ideal world, machines can be built by wiring devices together >> with configuration, not code. Unfortunately, that's not the world we >> live in right now. We still have quite a few devices that need to be >> wired up by code. If you try to device_add such a device, it'll fail >> in sometimes mysterious ways. If you're lucky, you get an >> unmysterious immediate crash. >>=20 >> To protect users from such badness, DeviceClass member no_user used to >> make device models unavailable with -device / device_add, but that >> regressed in commit 18b6dad. The device model is still omitted from >> help, but is available anyway. >>=20 >> Attempts to fix the regression have been rejected with the argument >> that the purpose of no_user isn't clear, and it's prone to misuse. >>=20 >> This commit clarifies no_user's purpose. Anthony suggested to rename >> it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which >> I shorten somewhat to keep checkpatch happy. While there, make it >> bool. >>=20 >> Every use of cannot_instantiate_with_device_add_yet gets a FIXME >> comment asking for rationale. The next few commits will clean them >> all up, either by providing a rationale, or by getting rid of the use. >>=20 >> With that done, the regression fix is hopefully acceptable. >>=20 >> Signed-off-by: Markus Armbruster >> Reviewed-by: Marcel Apfelbaum >> Signed-off-by: Andreas F=C3=A4rber > > Sorry about not commenting on this earlier. > It looks like a bunch of devices will have this flag > (whatever we call it) forever. Anthony has argued otherwise. > If so, _yet seems confusing, should be just > cannot_instantiate_with_device_add. I don't care. In fact, I was perfectly happy with 'no_user'. I renamed it (and added additional value) just to make my "protect users from device_add that's known not to work" regression palatable for Anthony. I recognize the result is an improvement, so Anthony wasn't entirely wrong ;) > Doesn't have to block this patchset, we can > rename it all in one patch easily. Thanks :)