From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnsDt-0007XX-Ij for qemu-devel@nongnu.org; Sat, 15 Jun 2013 11:17:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnsDs-00034w-7F for qemu-devel@nongnu.org; Sat, 15 Jun 2013 11:17:01 -0400 Received: from qmta15.emeryville.ca.mail.comcast.net ([76.96.27.228]:38095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnsDr-00034m-Ty for qemu-devel@nongnu.org; Sat, 15 Jun 2013 11:17:00 -0400 Message-ID: <51BC84CF.5000802@redhat.com> Date: Sat, 15 Jun 2013 16:14:23 +0100 From: Eric Blake MIME-Version: 1.0 References: <4543955.Y102znvq4W@al> In-Reply-To: <4543955.Y102znvq4W@al> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2GFDCXVXOITTIATQTICXJ" Subject: Re: [Qemu-devel] [PATCH] chardev: add baud parameter for serial host device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Wu Cc: Anthony Liguori , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2GFDCXVXOITTIATQTICXJ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/08/2013 10:49 PM, Peter Wu wrote: > When QEMU starts, it always changes the serial port parameters includin= g baud > rate. This confused my guest which thought it was outputting at 9600 ba= ud while > it was in fact changed to 115200. >=20 > After this patch, I can use `-serial /dev/ttyS0,baud=3D9600` to overrid= e 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`). >=20 > 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 implem= ent it, > do not forget to update the documentation on "COM" devices which is als= o of > backend serial. >=20 > Signed-off-by: Peter Wu > --- > +++ 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' } } > =20 > ## > +# @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, and furthermore... > + > +## > # @ChardevSocket: > # > # Configuration info for (stream) socket chardevs. > @@ -3311,7 +3325,7 @@ > { 'type': 'ChardevDummy', 'data': { } } > =20 > { '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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2GFDCXVXOITTIATQTICXJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRvITPAAoJEKeha0olJ0NqiQ8H/RdrpezBZGl3XaAU8pJcCodq wQHO9Qx3kn3L8NiNhN/Btb8bb5hCPjsvjOLykc897pqv0Ljm/yiwfOlFBMR26hIi ciIYS7KxauAZLoxHlbr2v7JgbGW7R2JwW5QpEMSo/wbxR8ep5G5yCSDLEq1qBPhD Lixsd2q4wJvbWgzqG0EdxghnldEMKR20+HFbAjSqXS0vEmVvQe2VUDR7amW6Otdt pQde3VoBZJL1rRjdKKG6SRSQ6zm0ESNSEXinftwbqEod/D7wU7JIsjdEBqy+F/FK 6GWHXMSq6Cq/6CuKN3im1qrrwMNKb/8XPbXoUxzDbPO/AOe6dxSvhaE0+gypUH4= =366A -----END PGP SIGNATURE----- ------enig2GFDCXVXOITTIATQTICXJ--