aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Chen <Wei.Chen@arm.com>2017-10-24 13:49:31 +0800
committerWill Deacon <will.deacon@arm.com>2017-10-24 11:49:47 +0100
commit83042d1e6ce625d2fb80c3d2059e29c3d3c608fe (patch)
tree17cc084cd23b94664e230ac83e13cbbdb49a4f62
parent84d77496a279c6e7ae5678737cb396a7a08d6721 (diff)
downloadkvmtool-83042d1e6ce625d2fb80c3d2059e29c3d3c608fe.tar.gz
arm: Allow all terminal ports to be bi-directional
In kvmtool, the terminal has 4 term-devices at most. And these term-devices can connect to serial8250 or virtio console ports. The kvmtool has a loop thread to detect the incoming data on these term-devices and then send the data to guest through serial8250 or virtio console ports. On x86, kvmtool allow to read data from all 4 term-devices. But on ARM, we only support reading data from the first term-devices. The data from the other term-devices will be ignored. Currently, we're adding the kvmtool support to runv (a kind of hyper container) with Hyperhq guys. Here we're using 3 serial ports in guest to communicate with host (Container runtime). On x86, it works fine, but on ARM it could not work. Because we're using terminal 2 to send/receive control message, but terminal 2 is single direction. In this case, we change the kvm__arch_read_term for ARM to allow reading data from all term-devices. Signed-off-by: Wei Chen <Wei.Chen@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arm/kvm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arm/kvm.c b/arm/kvm.c
index 3cfa90ab..2ab436e8 100644
--- a/arm/kvm.c
+++ b/arm/kvm.c
@@ -49,10 +49,8 @@ void kvm__arch_delete_ram(struct kvm *kvm)
void kvm__arch_read_term(struct kvm *kvm)
{
- if (term_readable(0)) {
- serial8250__update_consoles(kvm);
- virtio_console__inject_interrupt(kvm);
- }
+ serial8250__update_consoles(kvm);
+ virtio_console__inject_interrupt(kvm);
}
void kvm__arch_set_cmdline(char *cmdline, bool video)