From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnsMd-0001wk-TV for qemu-devel@nongnu.org; Sat, 15 Jun 2013 11:26:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnsMZ-0005pj-1w for qemu-devel@nongnu.org; Sat, 15 Jun 2013 11:26:03 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:59065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnsMY-0005pZ-OC for qemu-devel@nongnu.org; Sat, 15 Jun 2013 11:25:58 -0400 Received: by mail-wi0-f182.google.com with SMTP id m6so1078919wiv.9 for ; Sat, 15 Jun 2013 08:25:58 -0700 (PDT) From: Peter Wu Date: Sat, 15 Jun 2013 17:25:45 +0200 Message-ID: <2801661.HtiIQHWZAa@al> In-Reply-To: <51BC84CF.5000802@redhat.com> References: <4543955.Y102znvq4W@al> <51BC84CF.5000802@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8537553.DXRrVnprIY"; micalg="pgp-sha512"; protocol="application/pgp-signature" 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: Eric Blake Cc: Anthony Liguori , qemu-devel@nongnu.org --nextPart8537553.DXRrVnprIY Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 > > --- > > > > +++ 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 --nextPart8537553.DXRrVnprIY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQEcBAABCgAGBQJRvIeCAAoJEHPE18E9swc6k0QH/1AiLGTCQZXryqmJ9HkdeCJb QYP3c6en3RUpjqQGilSOV97aMzQ/VNOd5W/r8tJ7jnGTJqkaR/WxPhZ4yRqsyp16 B4jxAuzWQ1ATq9I7ZFqKHoiR7Gk2wR8XcR/To41mtwBDSydPUV+LIlTQPuo9p/Jm 6543ocIwEz1ujBr/6AJEEEcTorbzh/r16c06wF9kWj+kHW2B5qJ5cwuqALFP9Ol7 mC9xVY/2lCJf+vFy+4HXbyR26xslYmZjBdvngtg/yMlU2u0jgIQc2ynBlJZ8Rs3F cjDCv9if1R86rn7ywIAbBVIFwNRx1x6zwQVc5mH89wDj4nkWSbIsxAR3bzKYBXs= =MFX4 -----END PGP SIGNATURE----- --nextPart8537553.DXRrVnprIY--