diff options
author | Marc Zyngier <Marc.Zyngier@arm.com> | 2013-05-01 16:50:09 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-06-01 16:39:54 +0100 |
commit | 7652598814f70e0d25a2fab04d6cc9199a1cc797 (patch) | |
tree | e030ce7969df97fb04e3c6d1875d70270aa60185 | |
parent | d8bd1e1f72ab7e821e5eb6267fe11852be347c49 (diff) | |
download | kvmtool-7652598814f70e0d25a2fab04d6cc9199a1cc797.tar.gz |
kvm tools: console: unconditionally output to any console
Kvmtool suppresses any output to a console that has not been elected
as *the* console.
While this makes sense on the input side (we want the input to be sent
to one console driver only), it seems to be the wrong thing to do on
the output side, as it effectively prevents the guest from switching
from one console to another (think earlyprintk using 8250 to virtio
console).
After all, the guest *does* poke this device and outputs something
there.
Just remove the kvm->cfg.active_console test from the output paths.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | hw/serial.c | 3 | ||||
-rw-r--r-- | powerpc/spapr_hvcons.c | 5 | ||||
-rw-r--r-- | powerpc/spapr_rtas.c | 3 | ||||
-rw-r--r-- | virtio/console.c | 5 |
4 files changed, 4 insertions, 12 deletions
diff --git a/hw/serial.c b/hw/serial.c index 53b684ab..18bf5691 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -100,8 +100,7 @@ static void serial8250_flush_tx(struct kvm *kvm, struct serial8250_device *dev) dev->lsr |= UART_LSR_TEMT | UART_LSR_THRE; if (dev->txcnt) { - if (kvm->cfg.active_console == CONSOLE_8250) - term_putc(dev->txbuf, dev->txcnt, dev->id); + term_putc(dev->txbuf, dev->txcnt, dev->id); dev->txcnt = 0; } } diff --git a/powerpc/spapr_hvcons.c b/powerpc/spapr_hvcons.c index 0bdf75ba..605367b4 100644 --- a/powerpc/spapr_hvcons.c +++ b/powerpc/spapr_hvcons.c @@ -50,10 +50,7 @@ static unsigned long h_put_term_char(struct kvm_cpu *vcpu, unsigned long opcode, do { int ret; - if (vcpu->kvm->cfg.active_console == CONSOLE_HV) - ret = term_putc_iov(&iov, 1, 0); - else - ret = 0; + ret = term_putc_iov(&iov, 1, 0); if (ret < 0) { die("term_putc_iov error %d!\n", errno); } diff --git a/powerpc/spapr_rtas.c b/powerpc/spapr_rtas.c index c81d82b3..f3c8fa3e 100644 --- a/powerpc/spapr_rtas.c +++ b/powerpc/spapr_rtas.c @@ -53,8 +53,7 @@ static void rtas_put_term_char(struct kvm_cpu *vcpu, { char c = rtas_ld(vcpu->kvm, args, 0); - if (vcpu->kvm->cfg.active_console == CONSOLE_HV) - term_putc(&c, 1, 0); + term_putc(&c, 1, 0); rtas_st(vcpu->kvm, rets, 0, 0); } diff --git a/virtio/console.c b/virtio/console.c index b18d3a92..1f88a4bb 100644 --- a/virtio/console.c +++ b/virtio/console.c @@ -102,10 +102,7 @@ static void virtio_console_handle_callback(struct kvm *kvm, void *param) while (virt_queue__available(vq)) { head = virt_queue__get_iov(vq, iov, &out, &in, kvm); - if (kvm->cfg.active_console == CONSOLE_VIRTIO) - len = term_putc_iov(iov, out, 0); - else - len = 0; + len = term_putc_iov(iov, out, 0); virt_queue__set_used_elem(vq, head, len); } |