On 25.04.2018 14:31, Peter Maydell wrote: > On 25 April 2018 at 11:17, Thomas Huth <th...@redhat.com> wrote: >> On 25.04.2018 11:50, David Hildenbrand wrote: >>> On 25.04.2018 07:21, Thomas Huth wrote: >>>> The consoles ("sclpconsole" and "sclplmconsole") can only be configured >>>> with "-device" and "-chardev" so far. Other machines use the convenience >>>> option "-serial" to configure the default consoles, even for virtual >>>> consoles like spapr-vty on the pseries machine. So let's support this >>>> option on s390x, too. This way we can easily enable the serial console >>>> here again with "-nodefaults", for example: > >>>> + /* init consoles */ >>>> + if (serial_hds[0]) { >>>> + s390_create_sclpconsole("sclpconsole", serial_hds[0]); >>>> + } >>>> + if (serial_hds[1]) { >>>> + s390_create_sclpconsole("sclplmconsole", serial_hds[1]); >>>> + } >>> >>> What happens if more -serial are defined? An error? Silently ignored? >> >> Silently ignored, since this is also what almost all other machines are >> doing (look for serial_hds in hw/ and you'll see what I mean). >> >>> (e.g. do we have to redefine MAX_SERIAL_PORTS on s390x or add checking >>> code here?) >> >> As all the other machines are also not redefining MAX_SERIAL_PORTS, I >> think we should also not do this on s390x now, should we? > > Note that I have a series on-list which removes the MAX_SERIAL_PORTS > restriction, so you can have arbitrarily many serial ports.
Ah, great, good idea. Thanks for the hint, I was not aware of that patch series yet. > (If that gets into master before this there'll be a conflict, > but it's easy to resolve: just change "serial_hds[n]" to "serial_hd(n)".) Ok, that should be pretty easy to resolve, indeed. Thomas