x86: CPA avoid repeated lazy mmu flush
Impact: Flush the lazy MMU only once Pending mmu updates only need to be flushed once to bring the in-memory pagetable state up to date. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
34b0900d32
commit
7ad9de6ac8
1 changed files with 7 additions and 8 deletions
|
@ -575,14 +575,6 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
|
||||||
address = cpa->vaddr[cpa->curpage];
|
address = cpa->vaddr[cpa->curpage];
|
||||||
else
|
else
|
||||||
address = *cpa->vaddr;
|
address = *cpa->vaddr;
|
||||||
|
|
||||||
/*
|
|
||||||
* If we're called with lazy mmu updates enabled, the
|
|
||||||
* in-memory pte state may be stale. Flush pending updates to
|
|
||||||
* bring them up to date.
|
|
||||||
*/
|
|
||||||
arch_flush_lazy_mmu_mode();
|
|
||||||
|
|
||||||
repeat:
|
repeat:
|
||||||
kpte = lookup_address(address, &level);
|
kpte = lookup_address(address, &level);
|
||||||
if (!kpte)
|
if (!kpte)
|
||||||
|
@ -819,6 +811,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
|
||||||
|
|
||||||
vm_unmap_aliases();
|
vm_unmap_aliases();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we're called with lazy mmu updates enabled, the
|
||||||
|
* in-memory pte state may be stale. Flush pending updates to
|
||||||
|
* bring them up to date.
|
||||||
|
*/
|
||||||
|
arch_flush_lazy_mmu_mode();
|
||||||
|
|
||||||
cpa.vaddr = addr;
|
cpa.vaddr = addr;
|
||||||
cpa.numpages = numpages;
|
cpa.numpages = numpages;
|
||||||
cpa.mask_set = mask_set;
|
cpa.mask_set = mask_set;
|
||||||
|
|
Reference in a new issue