mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-23 09:14:27 +01:00
vc: hypervisor: qemu: Add rng device.
Kata Containers does not have provide a good entropy level, make use of a paravirtual rng device to solve this problem. Fixes: #445 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
@@ -82,6 +82,9 @@ type qemuArch interface {
|
||||
// appendVFIODevice appends a VFIO device to devices
|
||||
appendVFIODevice(devices []govmmQemu.Device, vfioDevice config.VFIODev) []govmmQemu.Device
|
||||
|
||||
// appendRNGDevice appends a RNG device to devices
|
||||
appendRNGDevice(devices []govmmQemu.Device, rngDevice config.RNGDev) []govmmQemu.Device
|
||||
|
||||
// handleImagePath handles the Hypervisor Config image path
|
||||
handleImagePath(config HypervisorConfig)
|
||||
}
|
||||
@@ -505,6 +508,16 @@ func (q *qemuArchBase) appendVFIODevice(devices []govmmQemu.Device, vfioDev conf
|
||||
return devices
|
||||
}
|
||||
|
||||
func (q *qemuArchBase) appendRNGDevice(devices []govmmQemu.Device, rngDev config.RNGDev) []govmmQemu.Device {
|
||||
devices = append(devices,
|
||||
govmmQemu.RngDevice{
|
||||
ID: rngDev.ID,
|
||||
},
|
||||
)
|
||||
|
||||
return devices
|
||||
}
|
||||
|
||||
func (q *qemuArchBase) handleImagePath(config HypervisorConfig) {
|
||||
if config.ImagePath != "" {
|
||||
q.kernelParams = append(q.kernelParams, kernelRootParams...)
|
||||
|
||||
Reference in New Issue
Block a user