qemu: Remove Qemu version check in ppc64le unit test

The Qemu version check in unit test case is no longer needed for
Power since we don't support Kata with Qemu version < 4.x.

Fixes: #315

Signed-off-by: bpradipt@in.ibm.com
This commit is contained in:
Pradipta Kr. Banerjee
2020-06-13 11:00:44 +00:00
parent 46f2618340
commit 21c9535ab4
2 changed files with 2 additions and 45 deletions

View File

@@ -24,8 +24,6 @@ const defaultQemuMachineType = QemuPseries
const defaultQemuMachineOptions = "accel=kvm,usb=off,cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken,cap-large-decr=off"
const defaultMemMaxPPC64le = 32256 // Restrict MemMax to 32Gb on PPC64le
const qmpMigrationWaitTimeout = 5 * time.Second
var qemuPaths = map[string]string{
@@ -114,14 +112,8 @@ func (q *qemuPPC64le) cpuModel() string {
func (q *qemuPPC64le) memoryTopology(memoryMb, hostMemoryMb uint64, slots uint8) govmmQemu.Memory {
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 {
q.Logger().Debug("Restricting maxmem to 32GB as Qemu Version < 2.10, Assumption: Kernel Version >= 4.11")
hostMemoryMb = defaultMemMaxPPC64le
}
q.Logger().Debug("Aligning maxmem to multiples of 256MB. Assumption: Kernel Version >= 4.11")
hostMemoryMb -= (hostMemoryMb % 256)
return genericMemoryTopology(memoryMb, hostMemoryMb, slots, q.memoryOffset)
}