mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-07 03:40:15 +00:00
runtime: do not add virtio-rng-pci device for confidential guests
Adding: "-object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0" for confidential guests is not necessary as the RNG source cannot be trusted and the guest kernel has the driver already disable as well. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
@@ -806,8 +806,8 @@ func (q *qemu) CreateVM(ctx context.Context, id string, network Network, hypervi
|
||||
qemuConfig.IOThreads = []govmmQemu.IOThread{*ioThread}
|
||||
}
|
||||
// Add RNG device to hypervisor
|
||||
// Skip for s390x as CPACF is used
|
||||
if machine.Type != QemuCCWVirtio {
|
||||
// Skip for s390x (as CPACF is used) or when Confidential Guest is enabled
|
||||
if machine.Type != QemuCCWVirtio && !q.config.ConfidentialGuest {
|
||||
rngDev := config.RNGDev{
|
||||
ID: rngID,
|
||||
Filename: q.config.EntropySource,
|
||||
|
Reference in New Issue
Block a user