diff options
author | Wei Chen <Wei.Chen@arm.com> | 2017-10-24 13:49:31 +0800 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-10-24 11:49:47 +0100 |
commit | 83042d1e6ce625d2fb80c3d2059e29c3d3c608fe (patch) | |
tree | 17cc084cd23b94664e230ac83e13cbbdb49a4f62 | |
parent | 84d77496a279c6e7ae5678737cb396a7a08d6721 (diff) | |
download | kvmtool-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.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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) |