1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

virDomainDeviceInfoCheckABIStability: Implement proper check for CCW addresses

CCW addresses need to be also checked for ABI stability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Peter Krempa 2023-11-02 16:08:57 +01:00
parent 658a024127
commit 1d456e18c7

View File

@ -19719,10 +19719,21 @@ virDomainDeviceInfoCheckABIStability(virDomainDeviceInfo *src,
}
break;
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW:
if (src->addr.ccw.cssid != dst->addr.ccw.cssid ||
src->addr.ccw.ssid != dst->addr.ccw.ssid ||
src->addr.ccw.devno != dst->addr.ccw.devno) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target device CCW address %1$x.%2$x.%3$04x does not match source %4$x.%5$x.%6$04x"),
dst->addr.ccw.cssid, dst->addr.ccw.ssid, dst->addr.ccw.devno,
src->addr.ccw.cssid, src->addr.ccw.ssid, src->addr.ccw.devno);
return false;
}
break;
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_USB:
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO:
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390:
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW:
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO:
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE:
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED: