int pgste_perform_essa(struct mm_struct *mm, unsigned long hva, int orc,
                        unsigned long *oldpte, unsigned long *oldpgste)
 {
+       struct vm_area_struct *vma;
        unsigned long pgstev;
        spinlock_t *ptl;
        pgste_t pgste;
        WARN_ON_ONCE(orc > ESSA_MAX);
        if (unlikely(orc > ESSA_MAX))
                return -EINVAL;
+
+       vma = vma_lookup(mm, hva);
+       if (!vma || is_vm_hugetlb_page(vma))
+               return -EFAULT;
        ptep = get_locked_pte(mm, hva, &ptl);
        if (unlikely(!ptep))
                return -EFAULT;
 int set_pgste_bits(struct mm_struct *mm, unsigned long hva,
                        unsigned long bits, unsigned long value)
 {
+       struct vm_area_struct *vma;
        spinlock_t *ptl;
        pgste_t new;
        pte_t *ptep;
 
+       vma = vma_lookup(mm, hva);
+       if (!vma || is_vm_hugetlb_page(vma))
+               return -EFAULT;
        ptep = get_locked_pte(mm, hva, &ptl);
        if (unlikely(!ptep))
                return -EFAULT;
  */
 int get_pgste(struct mm_struct *mm, unsigned long hva, unsigned long *pgstep)
 {
+       struct vm_area_struct *vma;
        spinlock_t *ptl;
        pte_t *ptep;
 
+       vma = vma_lookup(mm, hva);
+       if (!vma || is_vm_hugetlb_page(vma))
+               return -EFAULT;
        ptep = get_locked_pte(mm, hva, &ptl);
        if (unlikely(!ptep))
                return -EFAULT;