Gerd Hoffmann <kra...@redhat.com> writes:

>   Hi,
>
>> I think the main decision point here is whether we introduce a separate
>> chardev_add/chardev_del command or just use the qom-create command that has
>> been posted previously.
>
> Do you have a git tree with this series + qom-create to look at and play
> with?

https://github.com/aliguori/qemu/tree/chardev-qom.1

I haven't tried the qom-new command from Markus but I've also included
the -object option that I posted a while ago.  That seems to work.
Here's an example command line:

$ x86_64-softmmu/qemu-system-x86_64 \
     -object chardev-file,path=foo.txt,label=chr0,id=chr0,realized=on \
     -device isa-serial,index=0,chardev=chr0 -hda ~/images/linux.img \
     -snapshot -enable-kvm

A couple caveats:

- The label/id duplication is ugly.  The need to use label disappears
  though once we switch devices over to using links.

- Some error checking is needed to deal with trying to use an unrealized
  chardev.

- It may still make sense to have a chardev-add operation but I think
  that operation should work in terms of something like qom-new.
  Probably with some special casing to fix the container path to
  /backends/chardev and also to deal with automatically setting label
  based on id.  It may make sense to also always set realized explicitly
  to 'on' in chardev-add.

Regards,

Anthony Liguori

>
> thanks,
>   Gerd


Reply via email to