|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 24/25] xen/vpl011: buffer out chars when the backend is xen
Hi, On 01/08/18 00:28, Stefano Stabellini wrote: To avoid mixing the output of different domains on the console, buffer the output chars and print line by line. Unless the domain has input from the serial, in which case we want to print char by char for a smooth user experience. The size of SBSA_UART_OUT_BUF_SIZE is arbitrary. 90 should be large enough to accommodate the length of most lines of output (typically they are limited to 80 characters on Unix systems), plus one extra char for the string terminator. How about using the same value as vuart (e.g VUART_BUT_SIZE) instead? So we buffer the same way for the vpl011?
See my remark on the patch implementing vpl011_write_data_xen. + } else if ( d == input ||
Coding style:
}
else if
{
The code is quite difficult to read. It would be easier to differentiate (domain == input vs domain != input) even if it means a bit of duplication. You also don't handle all the cases.For the input domain, I don't think you want to print the domain in front. Instead I would rely on the "Switch to ...". This would avoid the problem where DomB needs to have his line printed while it is not the console input. If this happens in the middle of DomA, then you are loosing track what's going on. Also if you have the buffer full, you will write the line without a newline. So, the next line is going to be wrong. In that case, you need to add a newline before printed. I think you want to look at what we did in vuart_print_char. vpl011->uartris |= TXI; Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |