KVM: PPC: Book3S HV: Advertise availablity of HPT resizing on KVM HV
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 20 Dec 2016 05:49:07 +0000 (16:49 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 31 Jan 2017 11:00:07 +0000 (22:00 +1100)
This updates the KVM_CAP_SPAPR_RESIZE_HPT capability to advertise the
presence of in-kernel HPT resizing on KVM HV.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/powerpc.c

index 40a5b2d75ed19979aa0b52246d1c7951ecf0a367..2b3e4e620078252c087f2f1dc88d7490580a248e 100644 (file)
@@ -612,6 +612,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
        case KVM_CAP_SPAPR_MULTITCE:
                r = 1;
                break;
+       case KVM_CAP_SPAPR_RESIZE_HPT:
+               r = !!hv_enabled;
+               break;
 #endif
        case KVM_CAP_PPC_HTM:
                r = cpu_has_feature(CPU_FTR_TM_COMP) &&