* @gaddr: virtual address in the guest address space
  * @pmdp: pointer to the pmd associated with the pte
  * @prot: indicates access rights: PROT_NONE, PROT_READ or PROT_WRITE
- * @bits: pgste notification bits to set
+ * @bits: notification bits to set
  *
  * Returns 0 if successfully protected, -ENOMEM if out of memory and
  * -EAGAIN if a fixup is needed.
        int rc;
        pte_t *ptep;
        spinlock_t *ptl = NULL;
+       unsigned long pbits = 0;
 
        if (pmd_val(*pmdp) & _SEGMENT_ENTRY_INVALID)
                return -EAGAIN;
        if (!ptep)
                return -ENOMEM;
 
+       pbits |= (bits & GMAP_NOTIFY_MPROT) ? PGSTE_IN_BIT : 0;
+       pbits |= (bits & GMAP_NOTIFY_SHADOW) ? PGSTE_VSIE_BIT : 0;
        /* Protect and unlock. */
-       rc = ptep_force_prot(gmap->mm, gaddr, ptep, prot, bits);
+       rc = ptep_force_prot(gmap->mm, gaddr, ptep, prot, pbits);
        gmap_pte_op_end(ptl);
        return rc;
 }
        if (!MACHINE_HAS_ESOP && prot == PROT_READ)
                return -EINVAL;
        down_read(&gmap->mm->mmap_sem);
-       rc = gmap_protect_range(gmap, gaddr, len, prot, PGSTE_IN_BIT);
+       rc = gmap_protect_range(gmap, gaddr, len, prot, GMAP_NOTIFY_MPROT);
        up_read(&gmap->mm->mmap_sem);
        return rc;
 }
        down_read(&parent->mm->mmap_sem);
        rc = gmap_protect_range(parent, asce & _ASCE_ORIGIN,
                                ((asce & _ASCE_TABLE_LENGTH) + 1) * PAGE_SIZE,
-                               PROT_READ, PGSTE_VSIE_BIT);
+                               PROT_READ, GMAP_NOTIFY_SHADOW);
        up_read(&parent->mm->mmap_sem);
        spin_lock(&parent->shadow_lock);
        new->initialized = true;