On Fri, 14 Jan 2022 at 10:31, Ani Sinha <[email protected]> wrote:
>
> I have a question re the following commit :
>
> commit def337ffda34d331404bd7f1a42726b71500df22
> Author: Peter Maydell <[email protected]>
> Date:   Fri Apr 20 15:52:46 2018 +0100
>
>     serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS
>
>
> Does this mean that this limit of 4 slots qemu / hypervisor specific
> or is it limited in general by hardware across all hypervisor?
> Can you please clarify?

This commit was part of a series which removed the previous
compile time limit on the number of serial ports. (The later
6af2692e86f9fdfb3 and b8846a4d6352b2 remove that limit.)
For some hardware, like the ISA serial port, there is still a
compile time limit because we are emulating real hardware
which had a fixed limit, so there's no point in making QEMU's
code for that device capable of handling any number of ports.
(As the commit message says, the limit in this case is
imposed because there are fixed IO port and IRQ settings for
ISA serial ports.) Commit def337ffda3 is just disentangling
the old generic compile-time limit MAX_SERIAL_PORTS from the
new specific-to-this-device compile-time limit MAX_ISA_SERIAL_PORTS
so that the later commit 6af2692e86f9fdfb3 can delete
MAX_SERIAL_PORTS entirely.

Summary: QEMU (and KVM etc) have no limit on the number
of serial ports. Some specific device emulation does,
usually where the real device it's emulating is similarly
limited.

-- PMM

Reply via email to