From: Nikunj A Dadhania Date: Fri, 16 Oct 2015 04:57:53 +0000 (+0530) Subject: KVM: PPC: Implement extension to report number of memslots X-Git-Tag: KARO-TX6UL-2015-11-03~49^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bfec5c2cc0adad3b343281eb4f9b94222c5f594f;p=karo-tx-linux.git KVM: PPC: Implement extension to report number of memslots QEMU assumes 32 memslots if this extension is not implemented. Although, current value of KVM_USER_MEM_SLOTS is 32, once KVM_USER_MEM_SLOTS changes QEMU would take a wrong value. Signed-off-by: Nikunj A Dadhania Reviewed-by: Thomas Huth Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 2e51289610e4..6fd2405c7f4a 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -559,6 +559,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) else r = num_online_cpus(); break; + case KVM_CAP_NR_MEMSLOTS: + r = KVM_USER_MEM_SLOTS; + break; case KVM_CAP_MAX_VCPUS: r = KVM_MAX_VCPUS; break;