Since version 2.11.0, QEMU became bug-compatible with
PowerVM's vty implementation, by inserting a \0 after
every \r going to the guest. Guests are expected to
workaround this issue by removing every \0 immediately
following a \r.
Details
Details
- Reviewers
jhibbits bdragon - Commits
- rS355209: [PPC] Remove extra \0 char inserted on vty by QEMU
How to reproduce the issue:
- Start a FreeBSD VM with QEMU >= 2.11.0, appending -serial pty to its command line.
- On the VM, run minicom -H -D /dev/cuauX
- On the host, run minicom -H -D /dev/pts/Y
- On the host, type something and hit ENTER
The minicom running on the VM will then show an extra 00 char after 0d.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/powerpc/pseries/phyp_console.c | ||
---|---|---|
315 ↗ | (On Diff #63727) | Since you're already reading one character at a time, why not copy as you read, instead of the sequence of memmove() operations? |
sys/powerpc/pseries/phyp_console.c | ||
---|---|---|
315 ↗ | (On Diff #63727) | Ok, done, it looks better now. I've also added the if (hdr == 1) condition, because the removal of \0's should only be done once per hypervisor read, to avoid removing valid \0's after \r's, when phyp_inbuf is consumed by small reads. |