Hello
This is known issue, it was mentioned at first time about 9 years ago.
https://lkml.org/lkml/2008/2/5/401
https://bugzilla.redhat.com/show_bug.cgi?id=986761
But it seems not fixed. I tested on my setup.
My Host machine Debian Stretch (kernel 4.9-30), Guest vanilla kernel
4.4-76. Tried on Qemu 2.8 and 2.10
qemu-system-x86_64 -name guest=guest,debug-threads=on -S -object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-7-guest/master-key.aes
-machine pc-i440fx-2.8,accel=kvm,usb=off,dump-guest-core=off -cpu
SkylakeClient,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds_cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,osxsave=on,tsc_adjust=on,clflushopt=on,pdpe1gb=on
-m 4096 -realtime mlock=off -smp 4,sockets=1,cores=4,threads=1 -uuid
4537ca29-73b2-40c3-9b43-666de182ba5f -display none -no-user-config
-nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-7-guest/monitor.sock,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc
base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet
-no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1
-boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x8.0x7
-device
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x8
-device
ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x8.0x1
-device
ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x8.0x2 -drive
file=/home/dzagorui/csr/csr_disk.qcow2,format=qcow2,if=none,id=drive-ide0-0-0
-device
ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1
-netdev tap,fd=25,id=hostnet0 -device
e1000,netdev=hostnet0,id=net0,mac=52:54:00:a9:4c:86,bus=pci.0,addr=0x3
-netdev tap,fd=27,id=hostnet1 -device
e1000,netdev=hostnet1,id=net1,mac=52:54:00:d4:7f:fa,bus=pci.0,addr=0x4
-netdev tap,fd=28,id=hostnet2 -device
e1000,netdev=hostnet2,id=net2,mac=52:54:00:d6:ec:f6,bus=pci.0,addr=0x5
-netdev tap,fd=29,id=hostnet3 -device
e1000,netdev=hostnet3,id=net3,mac=52:54:00:99:2b:46,bus=pci.0,addr=0xa
-chardev
socket,id=charserial0,host=127.0.0.1,port=4000,telnet,server,nowait
-device isa-serial,chardev=charserial0,id=serial0 -chardev
socket,id=charserial1,host=127.0.0.1,port=4001,telnet,server,nowait
-device isa-serial,chardev=charserial1,id=serial1 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on
With this 100% reproduce:
dd if=/dev/zero of=/dev/ttyS1
And there is fix proposed by H. Peter Anvin in 2008
https://lkml.org/lkml/2008/2/7/485
So maybe it needs to be reworked?
Regards,
Denys