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>
This commit is contained in:
Alexey Kardashevskiy 2014-05-23 12:26:58 +10:00 committed by Alexander Graf
parent 3794d5482d
commit 6db5bb0f54
3 changed files with 16 additions and 0 deletions

View file

@ -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;
}