From 183beafddd6d9b44943fc10c236e0f99bf159caa Mon Sep 17 00:00:00 2001 From: Cezar Craciunoiu Date: Thu, 28 Nov 2024 11:28:19 +0200 Subject: [PATCH] fix(machine): Add 'rdrand' feature even if qemu < 8.0.0 This was added in qemu 4.0.0 and we refuse to run when 4.2.0 or lower is used anyway. Unikraft can now with rdrand only, so this is not a hard requriment. Signed-off-by: Cezar Craciunoiu --- machine/qemu/v1alpha1.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/machine/qemu/v1alpha1.go b/machine/qemu/v1alpha1.go index 340068d4e..051b7041c 100644 --- a/machine/qemu/v1alpha1.go +++ b/machine/qemu/v1alpha1.go @@ -421,10 +421,9 @@ func (service *machineV1alpha1Service) Create(ctx context.Context, machine *mach if machine.Spec.Emulation { onFeatures := QemuCPUFeatures{QemuCPUFeaturePdpe1gb} - if qemuVersion.LessThan(QemuVersion8_0_0) { - log.G(ctx).Warn("QEMU version is less than 8.0.0, consider updating to be able to emulate Unikraft v0.17.0 and greater") - } else { - onFeatures = append(onFeatures, QemuCPUFeatureRdrand, QemuCPUFeatureRdseed) + onFeatures = append(onFeatures, QemuCPUFeatureRdrand) + if qemuVersion.GreaterThanEqual(QemuVersion8_0_0) { + onFeatures = append(onFeatures, QemuCPUFeatureRdseed) } qopts = append(qopts,