Hi All, I'm new to the ML.
I've started to port Qemu to a new HW based on ARM926EJ-S core. So far so good, I've implemented some basic HW (INT controller, System register, UART, …) I'd like to redirect the virtual serial port not to the current default stdin/stdout of the Qemu application, but to a (Unix) socket. I'm not sure I'm looking at the proper solution, so any advice is welcomed. AFAIU, I may define a Unix socket with the command line: -chardev socket,id=sersok,path=~user/serialsocket,server,nowait and assign the new virtual serial device (named new-uart hereafter): -device new-uart,chardev=sersock Is it the proper way to map the new virtual UART to the Unix socket? My main question is about the driver implementation: For the first implementation, I simply used * qdev_init_chardev * qemu_chr_add_handlers * qemu_chr_fe_write calls to implement the virtual serial port. It works fine to print out and read from the standard I/O, but I'm not sure to understand what I should implement to use the chardev created from the command line rather than the default standard I/O. qdev_init_chardev() seems somewhat deprecated, as the implementation contains the following comment: /* FIXME: This function needs to go away: use chardev properties! */ Should I drop qdev_init_chardev() for another API? I've looked at several examples on virtual serial port in existing Qemu drivers, but I don't know what is the best and simplest way to go. Any advice would be greatly appreciated, Thanks, Manu.