1. 31 Jan, 2017 2 commits
    • Marc-André Lureau's avatar
      char: remove class kind field · 0b663b7d
      Marc-André Lureau authored
      The class kind is necessary to lookup the chardev name in
      qmp_chardev_add() after calling qemu_chr_new_from_opts() and to set
      the appropriate ChardevBackend (mainly to free the right
      fields).
      
      qemu_chr_new_from_opts() can be changed to use a non-qmp function
      using the chardev class typename. Introduce qemu_chardev_add() to be
      called from qemu_chr_new_from_opts() and remove the class chardev kind
      field. Set the backend->type in the parse callback (when non-common
      fields are added).
      Signed-off-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      0b663b7d
    • Marc-André Lureau's avatar
      char: get rid of CharDriver · 88cace9f
      Marc-André Lureau authored
      qemu_chr_new_from_opts() is modified to not need CharDriver backend[]
      array, but uses instead objectified qmp_query_chardev_backends() and
      char_get_class(). The alias field is moved outside in a ChardevAlias[],
      similar to QDevAlias for devices.
      
      "kind" and "parse" are moved to ChardevClass ("kind" is to be removed
      next)
      Signed-off-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      88cace9f
  2. 27 Jan, 2017 5 commits
  3. 24 Oct, 2016 2 commits
  4. 04 Feb, 2016 1 commit
  5. 19 Oct, 2015 1 commit
  6. 14 Oct, 2015 1 commit
  7. 16 Sep, 2015 1 commit
  8. 16 Sep, 2014 1 commit
  9. 06 Aug, 2014 1 commit
    • Paolo Bonzini's avatar
      backends: Introduce chr-testdev · 5692399f
      Paolo Bonzini authored
      From: Paolo Bonzini <pbonzini@redhat.com>
      
      chr-testdev enables a virtio serial channel to be used for guest
      initiated qemu exits. hw/misc/debugexit already enables guest
      initiated qemu exits, but only for PC targets. chr-testdev supports
      any virtio-capable target. kvm-unit-tests/arm is already making use
      of this backend.
      
      Currently there is a single command implemented, "q".  It takes a
      (prefix) argument for the exit code, thus an exit is implemented by
      writing, e.g. "1q", to the virtio-serial port.
      
      It can be used as:
         $QEMU ... \
           -device virtio-serial-device \
           -device virtserialport,chardev=ctd -chardev testdev,id=ctd
      
      or, use:
         $QEMU ... \
           -device virtio-serial-device \
           -device virtconsole,chardev=ctd -chardev testdev,id=ctd
      
      to bind it to virtio-serial port0.
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: 's avatarAndrew Jones <drjones@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      5692399f