From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0VH4-0003ow-9R for qemu-devel@nongnu.org; Tue, 07 Jan 2014 06:56:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0VGy-0007Rj-96 for qemu-devel@nongnu.org; Tue, 07 Jan 2014 06:56:46 -0500 Message-ID: <52CBEB73.9050906@suse.de> Date: Tue, 07 Jan 2014 12:56:35 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1387904675-7962-1-git-send-email-afaerber@suse.de> <1387904675-7962-2-git-send-email-afaerber@suse.de> <20131224194337.GA15879@redhat.com> <87a9f82iid.fsf@blackfin.pond.sub.org> In-Reply-To: <87a9f82iid.fsf@blackfin.pond.sub.org> 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: Markus Armbruster , "Michael S. Tsirkin" Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Alexander Graf , qemu-devel@nongnu.org, "Vassili Karpov (malc)" , Gerd Hoffmann , Anthony Liguori , Cornelia Huck , qemu-ppc , Richard Henderson Am 07.01.2014 11:28, schrieb Markus Armbruster: > "Michael S. Tsirkin" writes: >=20 >> On Tue, Dec 24, 2013 at 06:04:12PM +0100, Andreas F=C3=A4rber wrote: >>> From: Markus Armbruster >>> >>> 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. >>> >>> To protect users from such badness, DeviceClass member no_user used t= o >>> 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. >>> >>> 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. >>> >>> 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. >>> >>> 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= . >>> >>> With that done, the regression fix is hopefully acceptable. >>> >>> 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. >=20 > Anthony has argued otherwise. >=20 >> If so, _yet seems confusing, should be just >> cannot_instantiate_with_device_add. >=20 > I don't care. In fact, I was perfectly happy with 'no_user'. I rename= d > 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 ;) >=20 >> Doesn't have to block this patchset, we can >> rename it all in one patch easily. >=20 > Thanks :) Sorry for not explicitly having responded to that yet. In short, I regarded this patchset as an improvement, not blocking further improvements on top. It addresses feedback that blocked an earlier, simpler no_user-checking solution in qdev-monitor.c. Let's take further discussions off this pull request (that's still waiting to be processed) and back to where it last sparked! Thanks, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg