qemu: VhostUserDevice CCW device numbers
Add CCW (s390x) device numbers to VhostUserDevices, as is with other
device types. Add them to VhostUserFS devices (the only type currently
supported on s390x) when building QEMU parameters.
Fixes:
@@ -1211,6 +1211,9 @@ type VhostUserDevice struct {
// ROMFile specifies the ROM file being used for this device.
ROMFile string
+ // DevNo identifies the CCW device for s390x.
+ DevNo string
+
// Transport is the virtio transport for this device.
Transport VirtioTransport
}
@@ -1375,6 +1378,9 @@ func (vhostuserDev VhostUserDevice) QemuFSParams(config *Config) []string {
if vhostuserDev.SharedVersions {
devParams = append(devParams, "versiontable=/dev/shm/fuse_shared_versions")
}
+ if vhostuserDev.Transport.isVirtioCCW(config) {
+ devParams = append(devParams, fmt.Sprintf("devno=%s", vhostuserDev.DevNo))
+ }
if vhostuserDev.Transport.isVirtioPCI(config) && vhostuserDev.ROMFile != "" {
devParams = append(devParams, fmt.Sprintf("romfile=%s", vhostuserDev.ROMFile))
}
