[PATCH 1/2 for 8.0] Add the port allocation logic for isa-serial devices.

Ani Sinha ani at anisinha.ca
Thu Jan 13 15:44:51 UTC 2022



On Thu, 13 Jan 2022, Michal Prívozník wrote:


> > index 144ba4dd12..a8f41dc8c2 100644
> > --- a/src/conf/domain_conf.h
> > +++ b/src/conf/domain_conf.h
> > @@ -1187,6 +1187,12 @@ typedef enum {
> >      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LAST
> >  } virDomainChrConsoleTargetType;
> >
> > +/*
> > + * The value of VIR_MAX_ISA_SERIAL_PORTS corresponds to MAX_ISA_SERIAL_PORTS
> > + * set in qemu code base.
>
> We prefer upper case spelling of QEMU. And it's been a long time since
> I've last booted up my machine with ISA, but IIRC it could only have 4
> COM ports, so maybe the limit doesn't come from QEMU really but BIOS of
> that time? What I'm trying to say is, if this is a limit shared across
> other hypervisors then it can live under src/conf/ but if isn't shared
> then it has to go under hypervisor specific dir (src/qemu/ in this case).
>
> I'm just going to assume the limit is shared and not QEMU specific.

Maybe I read this wrong but I interpreted this commit message in QEMU
repo to mean that the limitation is qemu specific :

commit def337ffda34d331404bd7f1a42726b71500df22
Author: Peter Maydell <peter.maydell at linaro.org>
Date:   Fri Apr 20 15:52:46 2018 +0100

    serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS

    The ISA serial port handling in serial-isa.c imposes a limit
    of 4 serial ports. This is because we only know of 4 IO port
    and IRQ settings for them, and is unrelated to the generic
    MAX_SERIAL_PORTS limit, though they happen to both be set at
    4 currently.

    Use a new MAX_ISA_SERIAL_PORTS wherever that is the correct
    limit to be checking against.

    Signed-off-by: Peter Maydell <peter.maydell at linaro.org>
    Reviewed-by: Philippe Mathieu-Daudé <f4bug at amsat.org>
    Reviewed-by: Thomas Huth <thuth at redhat.com>
    Tested-by: Philippe Mathieu-Daudé <f4bug at amsat.org>
    Message-id: 20180420145249.32435-11-peter.maydell at linaro.org



More information about the libvir-list mailing list