mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 14:58:16 +00:00
Merge pull request #925 from woshijpf/fix-remove-hotplug-vfio-devices
virtcontainers: fix sandbox store struct VFIODevice bug
This commit is contained in:
@@ -32,7 +32,7 @@ const (
|
|||||||
// to be used by the Virtual Machine.
|
// to be used by the Virtual Machine.
|
||||||
type VFIODevice struct {
|
type VFIODevice struct {
|
||||||
*GenericDevice
|
*GenericDevice
|
||||||
vfioDevs []*config.VFIODev
|
VfioDevs []*config.VFIODev
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewVFIODevice create a new VFIO device
|
// NewVFIODevice create a new VFIO device
|
||||||
@@ -77,7 +77,7 @@ func (device *VFIODevice) Attach(devReceiver api.DeviceReceiver) error {
|
|||||||
BDF: deviceBDF,
|
BDF: deviceBDF,
|
||||||
SysfsDev: deviceSysfsDev,
|
SysfsDev: deviceSysfsDev,
|
||||||
}
|
}
|
||||||
device.vfioDevs = append(device.vfioDevs, vfio)
|
device.VfioDevs = append(device.VfioDevs, vfio)
|
||||||
}
|
}
|
||||||
|
|
||||||
// hotplug a VFIO device is actually hotplugging a group of iommu devices
|
// hotplug a VFIO device is actually hotplugging a group of iommu devices
|
||||||
@@ -126,7 +126,7 @@ func (device *VFIODevice) DeviceType() config.DeviceType {
|
|||||||
|
|
||||||
// GetDeviceInfo returns device information used for creating
|
// GetDeviceInfo returns device information used for creating
|
||||||
func (device *VFIODevice) GetDeviceInfo() interface{} {
|
func (device *VFIODevice) GetDeviceInfo() interface{} {
|
||||||
return device.vfioDevs
|
return device.VfioDevs
|
||||||
}
|
}
|
||||||
|
|
||||||
// It should implement GetAttachCount() and DeviceID() as api.Device implementation
|
// It should implement GetAttachCount() and DeviceID() as api.Device implementation
|
||||||
|
Reference in New Issue
Block a user