• F
    s390x: register I/O adapters per ISC during init · dde522bb
    Fei Li 提交于
    The I/O adapters should exist as soon as the bus/infrastructure
    exists, and not only when the guest is actually trying to do something
    with them. While the lazy allocation was not wrong, allocating at init
    time is cleaner, both for the architecture and the code. Let's adjust
    this by having each device type (currently for PCI and virtio-ccw)
    register the adapters for each ISC (as now we don't know which ISC the
    guest will use) as soon as it initializes.
    
    Use a two-dimensional array io_adapters[type][isc] to store adapters
    in ChannelSubSys, so that we can conveniently get the adapter id by
    the helper function css_get_adapter_id(type, isc).
    Signed-off-by: NFei Li <sherrylf@linux.vnet.ibm.com>
    Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
    dde522bb
css-bridge.c 4.2 KB