|
@@ -583,6 +583,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
|
|
|
* up accordingly.
|
|
|
*/
|
|
|
old_pte = *kpte;
|
|
|
+ /* Clear PSE (aka _PAGE_PAT) and move PAT bit to correct position */
|
|
|
req_prot = pgprot_large_2_4k(old_prot);
|
|
|
|
|
|
pgprot_val(req_prot) &= ~pgprot_val(cpa->mask_clr);
|
|
@@ -597,8 +598,6 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
|
|
|
req_prot = pgprot_clear_protnone_bits(req_prot);
|
|
|
if (pgprot_val(req_prot) & _PAGE_PRESENT)
|
|
|
pgprot_val(req_prot) |= _PAGE_PSE;
|
|
|
- else
|
|
|
- pgprot_val(req_prot) &= ~_PAGE_PSE;
|
|
|
req_prot = canon_pgprot(req_prot);
|
|
|
|
|
|
/*
|
|
@@ -684,8 +683,12 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
|
|
|
switch (level) {
|
|
|
case PG_LEVEL_2M:
|
|
|
ref_prot = pmd_pgprot(*(pmd_t *)kpte);
|
|
|
- /* clear PSE and promote PAT bit to correct position */
|
|
|
+ /*
|
|
|
+ * Clear PSE (aka _PAGE_PAT) and move
|
|
|
+ * PAT bit to correct position.
|
|
|
+ */
|
|
|
ref_prot = pgprot_large_2_4k(ref_prot);
|
|
|
+
|
|
|
ref_pfn = pmd_pfn(*(pmd_t *)kpte);
|
|
|
break;
|
|
|
|