KVM: s390: Make huge pages unavailable in ucontrol vms
Claudio Imbrenda
Reviewed-byQuoted 8 lines · On Wed, 1 Aug 2018 12:25:08 +0100 Janosch Frank <[email protected]> wrote:
We currently do not notify all gmaps when using
gmap_pmdp_xchg(), due to locking constraints. This makes ucontrol vms, which is the only vm type that creates multiple gmaps, incompatible with huge pages.ucontrol vms are rather exotic and creating a new locking concept is no easy task. Hence we return EINVAL when trying to active
KVM_CAP_S390_HPAGE_1Mand report it as being not available when checking for it.
makes sense
Quoted 19 lines
Signed-off-by Janosch Frank <[email protected]>--- arch/s390/kvm/kvm-s390.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/s390/kvm/kvm-s390.c +1
-1@@ -481,7 +481,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) break;case KVM_CAP_S390_HPAGE_1M : r =0 ; -if (hpage) +if (hpage && !kvm_is_ucontrol (kvm)) r =1 ;break ;case KVM_CAP_S390_MEM_OP :
arch/s390/kvm/kvm-s390.c static int kvm_vm_ioctl_enable_cap(struct kvm · line 697
Quoted 8 lines
arch/s390/kvm/kvm-s390.c +1
-1@@ -691,7 +691,7 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap) mutex_lock(&kvm->lock);if (kvm->created_vcpus) r = -EBUSY ; -else if (!hpage || kvm->arch.use_cmma) +else if (!hpage || kvm->arch.use_cmma ||kvm_is_ucontrol (kvm)) r = -EINVAL ;else { r =0 ;
the patch is rather straightforward
Reviewed-by Claudio Imbrenda <[email protected]>