Hide Forgot
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
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.
In addition to the question in comment 2, please try without console ports (-device virtserialport only). Is it reproducible in that case?
(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.
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.
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.
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.
Did not make it to 6.4. Postponed once again.
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?
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.
Thanks for checking. This means the ports are working fine, and as expected. Will close this one.