Bug 744681 - virtio_console failed to init console to /dev/hvc0 or /dev/vport* after module reload
Summary: virtio_console failed to init console to /dev/hvc0 or /dev/vport* after modul...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.2
Hardware: Unspecified
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 767187
TreeView+ depends on / blocked
 
Reported: 2011-10-10 07:40 UTC by Joy Pu
Modified: 2013-07-01 04:59 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-28 06:57:25 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 682184 0 medium CLOSED Two virtio-consoles don't work 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 963596 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 682184 963596

Description Joy Pu 2011-10-10 07:40:07 UTC
Description:
In RHEL 6.2 system, test virtio console in RHEL 6.2 guest. And the clean port
operate by `cat /dev/hvc0` will caused a warning message "No such device" after virtio_console module reload.
Form the demsg and debugfs can see the init message of virtio console after reload, but can not get the device to use it:

Version-Release number of selected component (if applicable):
2.6.32-202.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.Boot up a guest with virtio console support consoles
$ /root/autotest-devel/client/tests/kvm/qemu -name 'vm1' -chardev
socket,id=qmp_monitor_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20110402-160127-jxFC,server,nowait
-mon chardev=qmp_monitor_id_qmpmonitor1,mode=control -chardev
socket,id=serial_id_20110402-160127-jxFC,path=/tmp/serial-20110402-160127-jxFC,server,nowait
-device isa-serial,chardev=serial_id_20110402-160127-jxFC -drive
file='/root/autotest-devel/client/tests/kvm/images/RHEL-Server-6.1-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2,aio=native
-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1
-device
e1000,netdev=idbJXrWM,mac=9a:40:41:d9:12:c9,id=ndev00idbJXrWM,bus=pci.0,addr=0x3
-netdev
tap,id=idbJXrWM,ifname='t0-160127-jxFC',script='/root/autotest-devel/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no'
-m 2048 -smp 2,cores=1,threads=1,sockets=2 -cpu cpu64-rhel6,+sse2,+x2apic
-spice port=8000,disable-ticketing -vga qxl -rtc
base=utc,clock=host,driftfix=none -M rhel6.1.0 -boot order=cdn,once=c,menu=off 
 -usbdevice tablet -no-kvm-pit-reinjection -device
virtio-serial-pci,id=virtio-serial-pci0 -chardev
socket,path=/tmp/virtio-console-f29MyZ/0,id=vc0,server,nowait -device
virtconsole,chardev=vc0,name=console-0,id=console-0,bus=virtio-serial-pci0.0
-chardev socket,path=/tmp/virtio-console-f29MyZ/1,id=vc1,server,nowait -device
virtconsole,chardev=vc1,name=console-1,id=console-1,bus=virtio-serial-pci0.0
-device virtio-serial-pci,id=virtio-serial-pci1 -chardev
socket,path=/tmp/virtio-console-f29MyZ/2,id=vs2,server,nowait -device
virtserialport,chardev=vs2,name=serialport-2,id=serialport-2,bus=virtio-serial-pci1.0
-chardev socket,path=/tmp/virtio-console-f29MyZ/3,id=vs3,server,nowait -device
virtserialport,chardev=vs3,name=serialport-3,id=serialport-3,bus=virtio-serial-pci1.0
-enable-kvm

2. use cat to clean port for console 0
$ cat /dev/hvc0
3. reload module of virtio console
$ modprobe -r virtio_console
$ modprobe virtio_console
4. clean port of console 0 again and get the warning message
$ cat /dev/hvc0
$ cat /dev/vport0p0

Actual results:
Guest system report "No such device"

Expected results:
Can use console 0 after module virtio_console reload

Additional info:
1. debugfs after reload module
$cat /sys/kernel/debug/virtio-ports/*
name: console-0
guest_connected: 1
host_connected: 1
outvq_full: 0
is_console: yes
console_vtermno: 0
name: console-1
guest_connected: 1
host_connected: 0
outvq_full: 0
is_console: yes
console_vtermno: 1
name: serialport-2
guest_connected: 0
host_connected: 0
outvq_full: 0
is_console: no
console_vtermno: 1515870810
name: serialport-3
guest_connected: 0
host_connected: 0
outvq_full: 0
is_console: no
console_vtermno: 1515870810

Comment 2 Amit Shah 2011-12-09 11:37:55 UTC
Does this happen without issuing any calls to /dev/hvc*?  (e.g. cat /dev/hvc0)?

hvc is a tty type of a device, has to be used as such.  Most likely this will be closed as NOTABUG.

Comment 3 Amit Shah 2011-12-12 07:52:42 UTC
In addition to the question in comment 2, please try without console ports (-device virtserialport only).  Is it reproducible in that case?

Comment 4 Joy Pu 2012-01-09 10:17:20 UTC
(In reply to comment #3)
> In addition to the question in comment 2, please try without console ports
> (-device virtserialport only).  Is it reproducible in that case?

Hi Amit

Just test it. As write in this bug this is only problem with console port. The serial port works well.

Comment 7 RHEL Program Management 2012-07-10 07:00:28 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 8 RHEL Program Management 2012-07-10 23:29:27 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 10 RHEL Program Management 2012-07-23 11:21:56 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 11 Ronen Hod 2012-09-20 14:01:13 UTC
Did not make it to 6.4. Postponed once again.

Comment 13 Amit Shah 2013-05-17 05:18:44 UTC
One thing struck me: you're removing and inserting the virtio-console module, but the /dev/hvc devices are controlled by the hvc module.  Try /dev/hvc1 (or further ones) after module reload.  Does that work?

Comment 14 RHEL Program Management 2013-05-26 11:58:56 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 15 Joy Pu 2013-05-28 06:30:37 UTC
Hi Amit,

Just tested. After unload/load virtio_console module. The hvc device moves to the next one as you assumed. I tried several times and the device changed like this:

/dev/hvc0 --> /dev/hvc1 --> .... --> /dev/hvc7

As there are only 8 devices after that it always reports can not find device.

Comment 16 Amit Shah 2013-05-28 06:57:25 UTC
Thanks for checking.  This means the ports are working fine, and as expected.  Will close this one.


Note You need to log in before you can comment on or make changes to this bug.