Loading Documentation/virtual/kvm/api.txt +2 −1 Original line number Diff line number Diff line Loading @@ -4510,7 +4510,8 @@ Do not enable KVM_FEATURE_PV_UNHALT if you disable HLT exits. Architectures: s390 Parameters: none Returns: 0 on success, -EINVAL if hpage module parameter was not set or cmma is enabled or cmma is enabled, or the VM has the KVM_VM_S390_UCONTROL flag set With this capability the KVM support for memory backing with 1m pages through hugetlbfs can be enabled for a VM. After the capability is Loading arch/s390/kvm/kvm-s390.c +2 −2 Original line number Diff line number Diff line Loading @@ -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: Loading Loading @@ -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; Loading arch/s390/mm/gmap.c +3 −1 Original line number Diff line number Diff line Loading @@ -708,11 +708,13 @@ void gmap_discard(struct gmap *gmap, unsigned long from, unsigned long to) vmaddr |= gaddr & ~PMD_MASK; /* Find vma in the parent mm */ vma = find_vma(gmap->mm, vmaddr); if (!vma) continue; /* * We do not discard pages that are backed by * hugetlbfs, so we don't have to refault them. */ if (vma && is_vm_hugetlb_page(vma)) if (is_vm_hugetlb_page(vma)) continue; size = min(to - gaddr, PMD_SIZE - (gaddr & ~PMD_MASK)); zap_page_range(vma, vmaddr, size); Loading Loading
Documentation/virtual/kvm/api.txt +2 −1 Original line number Diff line number Diff line Loading @@ -4510,7 +4510,8 @@ Do not enable KVM_FEATURE_PV_UNHALT if you disable HLT exits. Architectures: s390 Parameters: none Returns: 0 on success, -EINVAL if hpage module parameter was not set or cmma is enabled or cmma is enabled, or the VM has the KVM_VM_S390_UCONTROL flag set With this capability the KVM support for memory backing with 1m pages through hugetlbfs can be enabled for a VM. After the capability is Loading
arch/s390/kvm/kvm-s390.c +2 −2 Original line number Diff line number Diff line Loading @@ -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: Loading Loading @@ -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; Loading
arch/s390/mm/gmap.c +3 −1 Original line number Diff line number Diff line Loading @@ -708,11 +708,13 @@ void gmap_discard(struct gmap *gmap, unsigned long from, unsigned long to) vmaddr |= gaddr & ~PMD_MASK; /* Find vma in the parent mm */ vma = find_vma(gmap->mm, vmaddr); if (!vma) continue; /* * We do not discard pages that are backed by * hugetlbfs, so we don't have to refault them. */ if (vma && is_vm_hugetlb_page(vma)) if (is_vm_hugetlb_page(vma)) continue; size = min(to - gaddr, PMD_SIZE - (gaddr & ~PMD_MASK)); zap_page_range(vma, vmaddr, size); Loading