Received: from eggs.gnu.org ([2001:4830:134:3::10]:54866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPnZh-000530-6D for qemu-devel@nongnu.org; Fri, 05 Sep 2014 03:04:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPnZX-0006S6-88 for qemu-devel@nongnu.org; Fri, 05 Sep 2014 03:04:49 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:40194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPnZW-0006Q1-ID for qemu-devel@nongnu.org; Fri, 05 Sep 2014 03:04:39 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 Sep 2014 17:04:34 +1000 From: Alexey Kardashevskiy Date: Fri, 5 Sep 2014 17:04:21 +1000 Message-Id: <1409900661-27961-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH] target-ppc: Fix kvmppc_set_compat to use negotiated cpu-version List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf 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 --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 48177ed..188b67e 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -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; } -- 2.0.0