Skip to content

Commit

Permalink
target-ppc: Fix kvmppc_set_compat to use negotiated cpu-version
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
aik authored and agraf committed Nov 4, 2014
1 parent 8f9fb7a commit 0b6ff57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target-ppc/translate_init.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0b6ff57

Please sign in to comment.