On 23/03/2018 15:04, Peter Maydell wrote: >> However, if the machine is emulating a real-world board with a fixed SoC >> and fixed hardware in the SoC, it makes more sense to create a null backend. > > That's a lot of duplicate code to say "oh, this is NULL, create the > null backend" in lots of different boards :-(
Note it's a null "backend", not necessarily a null "character device". Your proposal, namely ensuring that be->chr == NULL is handled properly in qemu_chr_fe_init, would be just fine. The main point was that the choice of whether to create the device is up to the board, and there isn't a single answer valid for all boards. Paolo
