From 0fb4396f9172c8effa74e52e63806e393d49f0de Mon Sep 17 00:00:00 2001 From: Nitesh Konkar Date: Wed, 12 Jun 2019 21:23:12 +0530 Subject: [PATCH] vc: Fix TestQemuPPC64leMemoryTopology after qemu version bump TestQemuPPC64leMemoryTopology fails on ppc64le as the corect qemu version is not detected. Fixes: #1790 Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com --- virtcontainers/qemu_ppc64le.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtcontainers/qemu_ppc64le.go b/virtcontainers/qemu_ppc64le.go index f2ea7b7c7c..302940434a 100644 --- a/virtcontainers/qemu_ppc64le.go +++ b/virtcontainers/qemu_ppc64le.go @@ -121,7 +121,7 @@ func (q *qemuPPC64le) cpuModel() string { func (q *qemuPPC64le) memoryTopology(memoryMb, hostMemoryMb uint64, slots uint8) govmmQemu.Memory { - if qemuMajorVersion >= 2 && qemuMinorVersion >= 10 { + if (qemuMajorVersion > 2) || (qemuMajorVersion == 2 && qemuMinorVersion >= 10) { q.Logger().Debug("Aligning maxmem to multiples of 256MB. Assumption: Kernel Version >= 4.11") hostMemoryMb -= (hostMemoryMb % 256) } else {