summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2022-11-22 14:46:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-23 19:44:26 +0100
commite6278a5445780c71cc3dfc6ceda2875838eac8e5 (patch)
treee18032c96c8c16ec1345675af44f925d7d2748bf /drivers/nvmem
parentadc40221bf676f3e722d135889a7b913b4162dc2 (diff)
downloadlinux-e6278a5445780c71cc3dfc6ceda2875838eac8e5.tar.bz2
virtio_console: Introduce an ID allocator for virtual console numbers
When a virtio console port is initialized, it is registered as an hvc console using a virtual console number. If a KVM guest is started with multiple virtio console devices, the same vtermno (or virtual console number) can be used to allocate different hvc consoles, which leads to various communication problems later on. This is also reported in debugfs : # grep vtermno /sys/kernel/debug/virtio-ports/* /sys/kernel/debug/virtio-ports/vport1p1:console_vtermno: 1 /sys/kernel/debug/virtio-ports/vport2p1:console_vtermno: 1 /sys/kernel/debug/virtio-ports/vport3p1:console_vtermno: 2 /sys/kernel/debug/virtio-ports/vport4p1:console_vtermno: 3 Replace the next_vtermno global with an ID allocator and start the allocation at 1 as it is today. Also recycle IDs when a console port is removed. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Link: https://lore.kernel.org/r/20221122134643.376184-1-clg@kaod.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
0 files changed, 0 insertions, 0 deletions