Re: [PATCH] kvm tools: Print only serial output to the terminal

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

 



On Wed, Aug 10, 2011 at 12:52 PM, Sasha Levin <levinsasha928@xxxxxxxxx> wrote:
> This patch changes the serial device to print only auxiliary output to the
> terminal.
>
> Doing so prevents printing output which the guest kernel never intended us
> to print and by printing it we wrote junk to the users terminal.
>
> Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
> ---
>  tools/kvm/hw/serial.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/kvm/hw/serial.c b/tools/kvm/hw/serial.c
> index 1199264..0393d3d 100644
> --- a/tools/kvm/hw/serial.c
> +++ b/tools/kvm/hw/serial.c
> @@ -213,7 +213,7 @@ static bool serial8250_out(struct ioport *ioport, struct kvm *kvm, u16 port, voi
>                case UART_TX: {
>                        char *addr = data;
>
> -                       if (!(dev->mcr & UART_MCR_LOOP))
> +                       if (!(dev->mcr & (UART_MCR_LOOP | UART_MCR_OUT2)))
>                                term_putc(CONSOLE_8250, addr, size * count);
>
>                        dev->iir                = UART_IIR_NO_INT;
> --
> 1.7.6

Aah, you can actually see the magic 0xff byte in
drivers/tty/serial/8250.c::autoconfig_irq(). Thanks Sasha!

                        Pekka
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux