diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2014-05-23 12:26:58 +1000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-06-16 13:24:38 +0200 |
commit | 6db5bb0f547b0a0889e8c2ee330f789916813e94 (patch) | |
tree | b613f4bbad7641fc7fc7f25d5f7e83c99a2612cd /target-ppc/translate_init.c | |
parent | 3794d5482d74dc0031cee6d5be2c61c88ca723bd (diff) | |
download | hqemu-6db5bb0f547b0a0889e8c2ee330f789916813e94.zip hqemu-6db5bb0f547b0a0889e8c2ee330f789916813e94.tar.gz |
KVM: PPC: Enable compatibility mode
The host kernel implements a KVM_REG_PPC_ARCH_COMPAT register which
this uses to enable a compatibility mode if any chosen.
This sets the KVM_REG_PPC_ARCH_COMPAT register in KVM. ppc_set_compat()
signals the caller if the mode cannot be enabled by the host kernel.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[agraf: fix TCG compat setting]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/translate_init.c')
-rw-r--r-- | target-ppc/translate_init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 56d3b97..c13cbba 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -8970,6 +8970,11 @@ int ppc_set_compat(PowerPCCPU *cpu, uint32_t cpu_version) break; } + if (kvm_enabled() && kvmppc_set_compat(cpu, cpu->max_compat) < 0) { + error_report("Unable to set compatibility mode in KVM"); + ret = -1; + } + return ret; } |