Hello qemu experts, In my virtual machine I have two uart and I want to use the input/output in my host machine. For that I commented out these lines in qemu_chr_open_stdio function in chardev/char-stdio.c. (qemu-6.2.0)
/* if (stdio_in_use) { error_setg(errp, "cannot use stdio by multiple character devices"); return; } */ And used this option for stdio. -chardev stdio,mux=on,id=char0 -serial chardev:char0 -serial chardev:char0 And two serial ports are generated and is multiplexed into stdio backend. Actually in the software on the virtual machine, the first uart is never written and only the second uart is written to. But the dtb contains two uarts so I had to generate two frontends anyway. But in real board, the first uart is written to by cortex-M7 chip and second is written to by an arm-v8 chip, so I see two seprate uart terminal working ok. But the problem is, in qemu virtual machine, after linux boots and the shell prompt is output, when I enter something in the shell, it just comes out to qemu monitor. I have put off this problem till now but I have to fix this anyway. Could anyone give me an advice? Thank you! Best regards, Chan Kim