Skip to contentSkip to conversation

target-ppc: Fix kvmppc_set_compat to use negotiated cpu-version

PATCH Applied Alexey Kardashevskiy 2 participants 2 messages Sep 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-ppc: Fix kvmppc_set_compat to use negotiated cpu-version

By mistake, QEMU uses the maximum compatibility level from the command line instead of the value negotiated in client-architecture-support call.

This replaces @max_compat with @cpu_version. This only affects guests which do not support the host CPU.

---
 target-ppc/translate_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-ppc/translate_init.c +1 -1
index 48177ed..188b67e 100644
@@ -9137,7 +9137,7 @@ int ppc_set_compat(PowerPCCPU *cpu, uint32_t cpu_version)
         break;
     }
 
-    if (kvm_enabled() && kvmppc_set_compat(cpu, cpu->max_compat) < 0) {
+    if (kvm_enabled() && kvmppc_set_compat(cpu, cpu->cpu_version) < 0) {
         error_report("Unable to set compatibility mode in KVM");
         ret = -1;
     }
Signature · 1 line
2.0.0
#1 lore raw
Quoted 7 lines · Alexey Kardashevskiy

By mistake, QEMU uses the maximum compatibility level from the command line instead of the value negotiated in client-architecture-support call.

This replaces @max_compat with @cpu_version. This only affects guests which do not support the host CPU.

Thanks, applied to ppc-next.

Alex