Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
qemu: use govmm vhost user device types directly
Browse files Browse the repository at this point in the history
For one thing, we should not make kata's internal device type
exactly as govmm string by string.

For another thing, latest govmm changes the device driver strings
and it breaks kata in such a way but the fault is on kata side IMHO.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
  • Loading branch information
bergwolf committed Feb 26, 2020
1 parent 4639294 commit 7104fe2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion virtcontainers/qemu_arch_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,16 +624,19 @@ func (q *qemuArchBase) appendVhostUserDevice(devices []govmmQemu.Device, attr co
case config.VhostUserNet:
qemuVhostUserDevice.TypeDevID = utils.MakeNameID("net", attr.DevID, maxDevIDSize)
qemuVhostUserDevice.Address = attr.MacAddress
qemuVhostUserDevice.VhostUserType = govmmQemu.VhostUserNet
case config.VhostUserSCSI:
qemuVhostUserDevice.TypeDevID = utils.MakeNameID("scsi", attr.DevID, maxDevIDSize)
qemuVhostUserDevice.VhostUserType = govmmQemu.VhostUserSCSI
case config.VhostUserBlk:
qemuVhostUserDevice.VhostUserType = govmmQemu.VhostUserBlk
case config.VhostUserFS:
qemuVhostUserDevice.TypeDevID = utils.MakeNameID("fs", attr.DevID, maxDevIDSize)
qemuVhostUserDevice.Tag = attr.Tag
qemuVhostUserDevice.CacheSize = attr.CacheSize
qemuVhostUserDevice.VhostUserType = govmmQemu.VhostUserFS
}

qemuVhostUserDevice.VhostUserType = govmmQemu.DeviceDriver(attr.Type)
qemuVhostUserDevice.SocketPath = attr.SocketPath
qemuVhostUserDevice.CharDevID = utils.MakeNameID("char", attr.DevID, maxDevIDSize)

Expand Down

0 comments on commit 7104fe2

Please # to comment.