Skip to content

Commit

Permalink
fix(machine): Add 'rdrand' feature even if qemu < 8.0.0
Browse files Browse the repository at this point in the history
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 <cezar.craciunoiu@unikraft.io>
  • Loading branch information
craciunoiuc committed Nov 28, 2024
1 parent 37b80c8 commit 183beaf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions machine/qemu/v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 183beaf

Please sign in to comment.