All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Wu <lekensteyn@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] chardev: add baud parameter for serial host device
Date: Sat, 15 Jun 2013 17:25:45 +0200	[thread overview]
Message-ID: <2801661.HtiIQHWZAa@al> (raw)
In-Reply-To: <51BC84CF.5000802@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3035 bytes --]

On Saturday 15 June 2013 16:14:23 Eric Blake wrote:
> On 06/08/2013 10:49 PM, Peter Wu wrote:
> > When QEMU starts, it always changes the serial port parameters including
> > baud rate. This confused my guest which thought it was outputting at 9600
> > baud while it was in fact changed to 115200.
> > 
> > After this patch, I can use `-serial /dev/ttyS0,baud=9600` to override the
> > default baud rate of 115200. Documentation is updated as well, so that
> > users know about the new `baud` parameter for `-serial` and `-chardev
> > serial` (and its alias `-chardev tty`).
> > 
> > Note that the baud option is not implemented for Windows. QEMU does not
> > change the default baud rate on Windows anyway. If somebody is going to
> > implement it, do not forget to update the documentation on "COM" devices
> > which is also of backend serial.
> > 
> > Signed-off-by: Peter Wu <lekensteyn@gmail.com>
> > ---
> > 
> > +++ b/qapi-schema.json
> > @@ -3186,7 +3186,7 @@
> > 
> >  # Configuration info for device and pipe chardevs.
> >  #
> >  # @device: The name of the special file for the device,
> > 
> > -#          i.e. /dev/ttyS0 on Unix or COM1: on Windows
> > +#          i.e. /dev/parport0 on Unix.
> > 
> >  # @type: What kind of device this is.
> >  #
> >  # Since: 1.4
> > 
> > @@ -3194,6 +3194,20 @@
> > 
> >  { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
> >  
> >  ##
> > 
> > +# @ChardevSerial
> > +#
> > +# Configuration info for serial chardevs.
> > +#
> > +# @device: The name of the special file for the device,
> > +#          i.e. /dev/ttyS0 on Unix or COM1: on Windows
> > +# @baud: #optional baud rate to set for host device. (default 115200)
> > +#
> > +# Since: 1.5
> > +##
> > +{ 'type': 'ChardevSerial', 'data': { 'device' : 'str',
> > +                                     '*baud': 'int' } }
> 
> Slick trick.  However, 1.5 is already released, so it is now since 1.6,
Well, it was worth trying :-P Anyway, I do not mind if the patch is edited to 
have 1.6 instead 1.5. Do you want me to send a new patch just for this tiny 
change or will you edit it before applying? (perhaps after adding a note to 
the commit message)

> and furthermore...
> 
> > +
> > +##
> > 
> >  # @ChardevSocket:
> >  #
> >  # Configuration info for (stream) socket chardevs.
> > 
> > @@ -3311,7 +3325,7 @@
> > 
> >  { 'type': 'ChardevDummy', 'data': { } }
> >  
> >  { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
> > 
> > -                                       'serial' : 'ChardevHostdev',
> > +                                       'serial' : 'ChardevSerial',
> 
> without introspection, libvirt has no idea whether 'baud' is supported
> in the qemu it is talking to, other than trying and failing when talking
> to older qemu.  This patch forms yet another reason why libvirt wants to
> learn when we add optional parameters to a pre-existing QMP command.

I have do not use libvirt, do you want me to do further things for this patch 
to get accepted? Or is it more a side-note?

Regards,
Peter

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2013-06-15 15:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-08 21:49 [Qemu-devel] [PATCH] chardev: add baud parameter for serial host device Peter Wu
2013-06-10  5:56 ` Gerd Hoffmann
2013-06-10  8:42   ` Peter Wu
2013-06-10 12:58     ` Gerd Hoffmann
2013-06-10 13:23       ` Andreas Färber
2013-06-10 13:28       ` Peter Wu
2013-06-10 13:51         ` Peter Wu
2013-06-15 15:14 ` Eric Blake
2013-06-15 15:25   ` Peter Wu [this message]
2013-06-15 15:38     ` Eric Blake

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=2801661.HtiIQHWZAa@al \
    --to=lekensteyn@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.