summaryrefslogtreecommitdiff
path: root/target-ppc/kvm.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-05-23 12:26:58 +1000
committerAlexander Graf <agraf@suse.de>2014-06-16 13:24:38 +0200
commit6db5bb0f547b0a0889e8c2ee330f789916813e94 (patch)
treeb613f4bbad7641fc7fc7f25d5f7e83c99a2612cd /target-ppc/kvm.c
parent3794d5482d74dc0031cee6d5be2c61c88ca723bd (diff)
downloadqemu-6db5bb0f547b0a0889e8c2ee330f789916813e94.zip
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/kvm.c')
-rw-r--r--target-ppc/kvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index ca31027df7..05952d09e7 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -1514,6 +1514,11 @@ void kvmppc_set_papr(PowerPCCPU *cpu)
cap_papr = 1;
}
+int kvmppc_set_compat(PowerPCCPU *cpu, uint32_t cpu_version)
+{
+ return kvm_set_one_reg(CPU(cpu), KVM_REG_PPC_ARCH_COMPAT, &cpu_version);
+}
+
void kvmppc_set_mpic_proxy(PowerPCCPU *cpu, int mpic_proxy)
{
CPUState *cs = CPU(cpu);