mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-18 21:55:59 +00:00
On s390x, QEMU uses the CCW bus instead of PCI. The network device hotplug path was hardcoded to find a PCI slot, which fails with "no free slots on PCI bridges" on s390x. Add CCW support to `hotplug_network_device`: when running on a native CCW bus, allocate a CCW subchannel address and use `devno` instead of PCI `bus`/`addr`/`vectors`. Additionally, after hotplugging a network device, the guest kernel needs time to probe the CCW device before the network interface appears. Add a retry loop (up to 10 attempts, 100ms apart) to `handle_interfaces` so that `update_interface` succeeds once the guest has created the link. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com> Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>