Commit adccf65c authored by Bharat Bhushan's avatar Bharat Bhushan Committed by Alexander Graf
Browse files

KVM: PPC: cache flush for kernel managed pages

Kernel can only access pages which maps as memory.
So flush only the valid kernel pages.

Signed-off-by: default avatarBharat Bhushan <>
Signed-off-by: default avatarAlexander Graf <>
parent 660696d1
......@@ -282,8 +282,15 @@ void kvmppc_init_lpid(unsigned long nr_lpids);
static inline void kvmppc_mmu_flush_icache(pfn_t pfn)
/* Clear i-cache for new pages */
struct page *page;
* We can only access pages that the kernel maps
* as memory. Bail out for unmapped ones.
if (!pfn_valid(pfn))
/* Clear i-cache for new pages */
page = pfn_to_page(pfn);
if (!test_bit(PG_arch_1, &page->flags)) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment