diff options
Diffstat (limited to 'target-ppc/kvm.c')
-rw-r--r-- | target-ppc/kvm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index ce8ac5b4de..50cfa02f78 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -740,6 +740,7 @@ void kvmppc_set_papr(CPUState *env) struct kvm_one_reg reg = {}; struct kvm_sregs sregs = {}; int ret; + uint64_t hior = env->spr[SPR_HIOR]; cap.cap = KVM_CAP_PPC_PAPR; ret = kvm_vcpu_ioctl(env, KVM_ENABLE_CAP, &cap); @@ -755,11 +756,14 @@ void kvmppc_set_papr(CPUState *env) * Once we have qdev CPUs, move HIOR to a qdev property and * remove this chunk. */ - reg.id = KVM_ONE_REG_PPC_HIOR; - reg.u.reg64 = env->spr[SPR_HIOR]; + reg.id = KVM_REG_PPC_HIOR; + reg.addr = (uintptr_t)&hior; ret = kvm_vcpu_ioctl(env, KVM_SET_ONE_REG, ®); if (ret) { - goto fail; + fprintf(stderr, "Couldn't set HIOR. Maybe you're running an old \n" + "kernel with support for HV KVM but no PAPR PR \n" + "KVM in which case things will work. If they don't \n" + "please update your host kernel!\n"); } /* Set SDR1 so kernel space finds the HTAB */ |