All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>
Cc: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>,
	Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Shalini Chellathurai Saroja <shalini@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, qemu-s390x@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 1/1] s390x/css: unresrict cssids
Date: Fri, 24 Nov 2017 13:46:50 +0100	[thread overview]
Message-ID: <20171124134650.46665791.cohuck@redhat.com> (raw)
In-Reply-To: <76f95c6f-641e-2fe0-73b4-3ab24fc1a93f@linux.vnet.ibm.com>

On Thu, 23 Nov 2017 14:33:56 +0100
Halil Pasic <pasic@linux.vnet.ibm.com> wrote:

> Having an adequate representation for the css in QOM would be certainly
> interesting, but at the same time (IMHO) is somewhat challenging. Let me
> make some observations, which should some of my concerns. 
> 
> We already have virtual-css-bridge which is  the QOM type/object that
> kind of conceptually stands for the channel subsystem as subsystem (not
> for the images but for the big whole).
> 
> The virtual-css-bridge is however non-user-creatable (inherited this from
> sysbus-device-type), so I doubt it can be used for specifying properties
> on the command line. That is no good for something like specifying the
> default css (image, not the big whole). What we usually do is pull up the
> property to the machine level. But this comes at a cost.

It might be better to not have inherit this from sysbus (at the price
of doing some stuff like reset handling ourselves.) Not sure if that
helps for this concrete issue, though.

> 
> A small digression, Christian pointed me to the -set cmd line option.
> I've done a quick PoC (assigned an id in code and did the command line)
> but I failed.
> 
> Furthermore the (canonical) QOM path of virtual-css-bridge is
> /machine/unattached/device[2] (there is a link from sysbus but the child
> property is connecting it to unattached, see [1]). I would prefer seeing
> and working wit something like /machine/css/default_css.

That's because the parent reference is not set up before registering
the device. It should do a object_property_add_child() (as e.g. the
flic does) so that it will show up as attached to the machine.

> 
> Under the virtual-css-bridge there is a virtual-css-bus called
> QOM-path-ly virtual-css, so it's canonical path is
> /machine/unattached/device[2]/virtual-css. The virtual-css-bus is in qdev
> a bus however. AFAIU buses are not very suitable for hosting properties
> (as one can't attach/add buses directly only via devices.
> 
> Another interesting fact is that virtio-ccw devices are QOMly only linked
> to their qdev parent bus, the virtual-ccs-bus, and are a QOMly children
> of /machine/peripheral (see [2]).

That's true of anything added via qdev_device_add().

[As an aside, that's why the autogenerated net devices show up as
unattached as well. Not sure if it is worth doing anything about it.]

> 
> To sum it up: I'm pretty confused with the QOM view of things.
> 
> My intuition would be that the object/device has to be somewhere between
> /machine and the vrtio-ccw devices in the children graph.  And since we
> want to do a command line controllable properties on the css object, the
> object probably needs to be a device.
> 
> Given what we currently have I don't see a good place for this css
> object.

I don't think qom is supposed to map the hardware hierarchy (I might be
mistaken, though.) I don't see anything speaking against a css object
attached to the machine (if we can't use the css bridge for that
purpose.)

> 
> Furthermore I'm currently under the impression that every non-abstract
> device is user creatable (but some can be created only implicitly). Some
> seem to go even further and say should workwith device-add [3].

There are quite a number of devices for which being user-createable
does not make any sense at all.

What _could_ make sense is having a way to add css images manually and
having specify whether they are default. (Obviously not when they are
hotplugged.) For compatibility, we could create css image 0xfe
automatically as default if none has been defined. Not sure how easy it
would be to get this right, though.

  reply	other threads:[~2017-11-24 12:47 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 11:18 [Qemu-devel] [RFC PATCH 1/1] s390x/css: unresrict cssids Halil Pasic
2017-11-21 13:44 ` Cornelia Huck
2017-11-21 14:27   ` Christian Borntraeger
2017-11-21 14:45   ` Christian Borntraeger
2017-11-21 16:06     ` Cornelia Huck
2017-11-21 18:10       ` Christian Borntraeger
2017-11-22 12:18         ` Cornelia Huck
2017-11-21 15:47   ` Halil Pasic
2017-11-21 16:20     ` Cornelia Huck
2017-11-21 17:05       ` Halil Pasic
2017-11-22 12:13         ` Cornelia Huck
2017-11-22 14:45           ` Boris Fiuczynski
2017-11-22 16:25             ` Cornelia Huck
2017-11-23 13:33               ` Halil Pasic
2017-11-24 12:46                 ` Cornelia Huck [this message]
2017-11-24 13:01                   ` Christian Borntraeger
2017-11-24 13:27                     ` Cornelia Huck
2017-11-24 14:58                       ` Christian Borntraeger
2017-11-24 15:30                         ` Halil Pasic
2017-11-24 16:15                           ` Cornelia Huck
2017-11-24 16:39                             ` Halil Pasic
2017-11-27  2:20                               ` Dong Jia Shi
2017-11-27 12:58                                 ` Cornelia Huck
2017-11-28  2:10                                   ` Dong Jia Shi
2017-11-27 12:56                               ` Cornelia Huck
2017-11-27 13:11                                 ` Halil Pasic
2017-11-27 13:19                                   ` Cornelia Huck
2017-11-27 14:03                                     ` Christian Borntraeger
2017-11-27 14:38                                       ` Halil Pasic
2017-11-27 14:13                                     ` Halil Pasic
2017-11-27 15:09                                       ` Boris Fiuczynski
2017-11-27 16:56                                         ` Cornelia Huck
2017-11-27 17:34                                           ` Halil Pasic
2017-11-28  2:08                                           ` Dong Jia Shi
2017-11-28  8:53                                           ` Boris Fiuczynski
2017-11-28 10:22                                             ` Cornelia Huck
2017-11-28 11:49                                               ` Boris Fiuczynski
2017-11-28 12:14                                                 ` Cornelia Huck
2017-11-28 12:24                                                   ` Christian Borntraeger
2017-11-28 13:17                                                     ` Halil Pasic
2017-11-28 13:25                                                       ` Christian Borntraeger
2017-11-28 14:01                                                         ` Cornelia Huck
2017-11-28 14:17                                                           ` Christian Borntraeger
2017-11-28 14:45                                                             ` Cornelia Huck
2017-11-29 18:51                                                               ` Christian Borntraeger
2017-11-30  9:50                                                                 ` Cornelia Huck
2017-11-30 12:09                                                                   ` Christian Borntraeger
2017-11-28 14:11                   ` Halil Pasic
2017-11-23 16:09           ` Halil Pasic
2017-11-23 16:59             ` Cornelia Huck
2017-11-22 11:25 ` Shalini Chellathurai Saroja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171124134650.46665791.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=bjsdjshi@linux.vnet.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=fiuczy@linux.vnet.ibm.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=shalini@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.