mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 04:04:45 +00:00
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: #170 Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
This commit is contained in:
parent
3eaeda7f6d
commit
abd3c7ea03
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user