Re: [PATCH] Revert "virtio_console: Initialize guest_connected=true for rproc_serial"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (Tue) 12 Mar 2013 [12:05:03], Sjur Brændeland wrote:
> On Tue, Mar 12, 2013 at 8:34 AM, Amit Shah <amit.shah@xxxxxxxxxx> wrote:
> > On (Mon) 11 Mar 2013 [16:15:00], sjur.brandeland@xxxxxxxxxxxxxx wrote:
> >> From: Sjur Brćndeland <sjur.brandeland@xxxxxxxxxxxxxx>
> >>
> >> This reverts commit 8078db789a92b10ff6e2d713231b5367e014c53b.
> >>
> >> The reverted patch caused opening of ports to fail for rproc_serial.
> >> In probe guest_connected was set to true, but port_fops_open()
> >> fails with -EMFILE if guest_connected already is true.
> >
> > OK, I missed that.  Can you add a comment near the 2nd hunk mentioning
> > this?
> 
> Ok, I ended up rewriting the whole comment here in my attempt
> to "mention this". Perhaps it's a bit over the top to write a short essay to
> explain two code lines, but anyway here it is. Let me know what you think:
> 
> 	/*
> 	 * Normally the port should not accept data when the port is
> 	 * closed. For generic serial ports, the host won't (shouldn't)
> 	 * send data till the guest is connected. But this condition
> 	 * can be reached when a console port is not yet connected (no
> 	 * tty is spawned) and the other side sends out data over the
> 	 * vring, or when a remote devices start sending data before
> 	 * the ports are opened.
> 	 *
> 	 * A generic serial port will discard data if not connected,
> 	 * while console ports and rproc-serial ports accepts data at
> 	 * any time. rproc-serial is initiated with guest_connect = false

'guest_connected'

> 	 * because port_fops_open expects this. Console ports are
> 	 * hooked up with an HVC console and is initialized with
> 	 * guest_connected = true.
> 	 */

Yes, it is a bit verbose, but looks fine to me.

Thanks,

		Amit
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux