Skip to content

Commit

Permalink
PPC: KVM: Use vm check_extension for pv hcall
Browse files Browse the repository at this point in the history
To find out whether we support the KVM hypercall interface we need to ask KVM
on the VM level rather than the global KVM level, because Book3S HV KVM does
not support it and we play conservative when both HV and PR are loaded.

So instead, use the VM helper that falls back to global KVM enumeration. That
should cover all cases.

Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
agraf committed Sep 8, 2014
1 parent 7d0a07f commit 6fd33a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target-ppc/kvm.c
Expand Up @@ -1835,7 +1835,7 @@ static int kvmppc_get_pvinfo(CPUPPCState *env, struct kvm_ppc_pvinfo *pvinfo)
PowerPCCPU *cpu = ppc_env_get_cpu(env);
CPUState *cs = CPU(cpu);

if (kvm_check_extension(cs->kvm_state, KVM_CAP_PPC_GET_PVINFO) &&
if (kvm_vm_check_extension(cs->kvm_state, KVM_CAP_PPC_GET_PVINFO) &&
!kvm_vm_ioctl(cs->kvm_state, KVM_PPC_GET_PVINFO, pvinfo)) {
return 0;
}
Expand Down

0 comments on commit 6fd33a7

Please sign in to comment.