diff mbox

kvm tools: Print only serial output to the terminal

Message ID alpine.DEB.2.00.1108101827340.2386@tiger (mailing list archive)
State New, archived
Headers show

Commit Message

Pekka Enberg Aug. 10, 2011, 3:28 p.m. UTC
On Wed, 10 Aug 2011, Sasha Levin wrote:
> Pekka, could you check whats the MCR value when your guest is writing
> from usermode?

MCR: b
MCR: b
MCR: b
MCR: b
MCR: b
MCR: b
MCR: b
MCR: b
MCR: b
MCR: b

   # KVM session terminated.
diff mbox

Patch

diff --git a/tools/kvm/hw/serial.c b/tools/kvm/hw/serial.c
index 1199264..44d9439 100644
--- a/tools/kvm/hw/serial.c
+++ b/tools/kvm/hw/serial.c
@@ -213,8 +213,10 @@  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);
+			else
+				printf("MCR: %x\n",  dev->mcr);

  			dev->iir		= UART_IIR_NO_INT;
  			break;