From 773582c56b37a4bc15fad609edc2efff11fde632 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Sun, 21 Jun 2020 23:35:30 +1000 Subject: [PATCH 1/2] qemu: Don't apply x86 specific kernel parameters on ppc64le qemu_ppc64le.go applies the "tsc=reliable", "no_timer_check" and "noreplace-smp" kernel parameters, despite those being x86 specific. So, just remove them. Signed-off-by: David Gibson --- src/runtime/virtcontainers/qemu_ppc64le.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/runtime/virtcontainers/qemu_ppc64le.go b/src/runtime/virtcontainers/qemu_ppc64le.go index 948642d52d..93779a81cd 100644 --- a/src/runtime/virtcontainers/qemu_ppc64le.go +++ b/src/runtime/virtcontainers/qemu_ppc64le.go @@ -33,10 +33,7 @@ var qemuPaths = map[string]string{ } var kernelParams = []Param{ - {"tsc", "reliable"}, - {"no_timer_check", ""}, {"rcupdate.rcu_expedited", "1"}, - {"noreplace-smp", ""}, {"reboot", "k"}, {"console", "hvc0"}, {"console", "hvc1"}, From f2c6eb16399f7ec0ba81d723533eb6cecad473dd Mon Sep 17 00:00:00 2001 From: David Gibson Date: Sun, 21 Jun 2020 23:43:59 +1000 Subject: [PATCH 2/2] qemu: Don't use non-existent pmu=off cpu parameter on POWER The ppc64 specific qemu setup code adds a "pmu=off" parameter to the cpu model if the nestedRun option is set. But, not only does availability of the pmu have nothing to do with nesting on POWER, there is no "pmu=" cpu opton for ppc64 at all. So, simply remove it. Signed-off-by: David Gibson --- src/runtime/virtcontainers/qemu_ppc64le.go | 6 +----- src/runtime/virtcontainers/qemu_ppc64le_test.go | 5 ----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/runtime/virtcontainers/qemu_ppc64le.go b/src/runtime/virtcontainers/qemu_ppc64le.go index 93779a81cd..8f14f36cc8 100644 --- a/src/runtime/virtcontainers/qemu_ppc64le.go +++ b/src/runtime/virtcontainers/qemu_ppc64le.go @@ -102,11 +102,7 @@ func (q *qemuPPC64le) bridges(number uint32) { } func (q *qemuPPC64le) cpuModel() string { - cpuModel := defaultCPUModel - if q.nestedRun { - cpuModel += ",pmu=off" - } - return cpuModel + return defaultCPUModel } func (q *qemuPPC64le) memoryTopology(memoryMb, hostMemoryMb uint64, slots uint8) govmmQemu.Memory { diff --git a/src/runtime/virtcontainers/qemu_ppc64le_test.go b/src/runtime/virtcontainers/qemu_ppc64le_test.go index 6c33cff038..9a4783e041 100644 --- a/src/runtime/virtcontainers/qemu_ppc64le_test.go +++ b/src/runtime/virtcontainers/qemu_ppc64le_test.go @@ -32,11 +32,6 @@ func TestQemuPPC64leCPUModel(t *testing.T) { expectedOut := defaultCPUModel model := ppc64le.cpuModel() assert.Equal(expectedOut, model) - - ppc64le.enableNestingChecks() - expectedOut = defaultCPUModel + ",pmu=off" - model = ppc64le.cpuModel() - assert.Equal(expectedOut, model) } func getQemuVersion() (qemuMajorVersion int, qemuMinorVersion int) {