From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsJ40-00035H-Tr for qemu-devel@nongnu.org; Mon, 07 Jan 2013 15:12:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsJ3x-0006iJ-3Q for qemu-devel@nongnu.org; Mon, 07 Jan 2013 15:12:52 -0500 Received: from e31.co.us.ibm.com ([32.97.110.149]:49517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsJ3w-0006iF-TP for qemu-devel@nongnu.org; Mon, 07 Jan 2013 15:12:49 -0500 Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 Jan 2013 13:12:48 -0700 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 620303E40040 for ; Mon, 7 Jan 2013 13:12:18 -0700 (MST) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r07KCFNA238304 for ; Mon, 7 Jan 2013 13:12:15 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r07KCEJN014805 for ; Mon, 7 Jan 2013 13:12:14 -0700 From: Anthony Liguori In-Reply-To: References: <1355760006-891-1-git-send-email-borntraeger@de.ibm.com> <874nisvlfv.fsf@codemonkey.ws> Date: Mon, 07 Jan 2013 14:12:09 -0600 Message-ID: <87ip78u50m.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] qdev: obey no_user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Christian Borntraeger , "qemu-devel@nongnu.org" Peter Maydell writes: > On 7 January 2013 19:32, Anthony Liguori wrote: >> Christian Borntraeger writes: >> >>> since >>> >>> commit 18b6dade8c0799c48f5c5e124b8c407cd5e22e96 >>> qdev: refactor device creation to allow bus_info to be set only in class >>> >>> A user can specify a device that is no_user. >>> For example on my i386 box, I can add a 2nd kvmvapic device. >>> >>> This patch checks for no-user and rejects the device_add. >>> >>> Signed-off-by: Christian Borntraeger >> >> I specifically broke this when QOM was introduced because no_user >> precludes a management tool from constructing a machine directlt. > > You can't do that anyway... > >> The real problem you're trying to solve is that it's an error to have >> two kvmvapic devices, not that users shouldn't be allowed to create them >> via -device. > > That's not the only thing no-user gets used for. A bunch of the > ARM sysbus devices have it set presumably because it's just > flat impossible for a user to correctly create and wire in a sysbus > device at all, so you might as well not confuse matters by listing > them in '-device help' output. (We're not consistent about that, > though.) > > It seems to me like arbitrarily allowing the monitor to construct > no-user devices isn't really the right way to attack the problem > of "allow complete machine construction by management tools"... There is no such thing as a 'no-user' device. It's a silly distinction that has never had a consistent meaning. There's really no good reason why kvmvapic isn't supported by -device other than it was an implementation short cut. Regards, Anthony Liguori > > -- PMM