Received: from eggs.gnu.org ([2001:4830:134:3::10]:42968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byZd4-00013u-Nv for qemu-devel@nongnu.org; Mon, 24 Oct 2016 03:25:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byZd3-00034Z-Rv for qemu-devel@nongnu.org; Mon, 24 Oct 2016 03:25:06 -0400 From: Markus Armbruster References: <20161018130007.k7hhxovkxiqiumfj@kamzik.brq.redhat.com> <20161018131829.GQ3275@thinpad.lan.raisama.net> <20161018142247.55d4aymduofvhy3r@kamzik.brq.redhat.com> <20161018152207.GZ3275@thinpad.lan.raisama.net> <20161018162202.pmui5rv3va7ubcrv@kamzik.brq.redhat.com> <20161018175737.3biqteztu3esvaaq@kamzik.brq.redhat.com> <20161018184532.GC3275@thinpad.lan.raisama.net> <20161018204937.GB5057@thinpad.lan.raisama.net> <87d1iteeym.fsf@dusky.pond.sub.org> Date: Mon, 24 Oct 2016 09:24:53 +0200 In-Reply-To: (Peter Maydell's message of "Sat, 22 Oct 2016 10:31:11 +0100") Message-ID: <87k2cy9pkq.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] QOM properties vs C functions/fields (was Re: [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn()) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Anthony Green , QEMU Developers , Max Filippov , Greg Ungerer , "Edgar E . Iglesias" , Guan Xuetao , Chen Gang , Jia Liu , Alexander Graf , Bharata B Rao , David Gibson , Artyom Tarasenko , Laurent Vivier , Andrew Jones , Eduardo Habkost , Greg Kurz , qemu-arm , Igor Mammedov , Richard Henderson , Matthew Rosato , Bastian Koppelmann , Michael Walle , "qemu-ppc@nongnu.org" , Paolo Bonzini , Aurelien Jarno Peter Maydell writes: > On 21 October 2016 at 19:26, Markus Armbruster wrote: >> "Device not pluggable" does not imply "device has no configuration knobs >> a user may legitimately want to mess with". Plenty of onboard devices >> have such knobs. >> >> Right now, users configure these mostly via board-agnostic options like >> -serial. Anything that doesn't fit the mold can't be configured that >> way. >> >> However, A fully mature QOM as I envisage it would provide users access >> to QOM properties for onboard devices, too. Not with -device, >> obviously, but with qom-set and similar, as Eduardo said. If any of >> these properties are not for users, they should be marked as such. Just >> like for pluggable devices. > > Yes, you're right about this. (What's the command line > equivalent of qom-set? Command line isn't implemented. > We have -global but that's a bit > awkward if I'm remembering its syntax correctly.) -global changes a device property default value. You can abuse it to set a specific device's property only when there's at most one instance. >> Perhaps non-pluggable devices tend to have more "not for users" QOM >> properties than pluggable ones, I don't know. But that would be a >> *quantitative* difference, not a *qualitative* one. > > I agree that it's not really qualitative, but a pluggable > device's properties are all by definition for the user > to set (since the user is the only one who can set them). > In a pre-plugged device, although there may be a lot of > properties, some of them won't be usefully changeable > in the context of this device in this board (ie if you > mess with them you'll just break things). We don't have > any way for the board to say "this stuff isn't for the > user", I think. The closest we have now is the x-prefix convention. Perhaps we could use a flag to mark certain properties as "not user-settable", similar to how we mark devices as "not pluggable" (really: can be created only by board code, not the user).