[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] mm: Export follow_pte() for KVM so that KVM can stop using follow_pfn()
Export follow_pte() to fix build breakage when KVM is built as a module.
An in-flight KVM fix switches from follow_pfn() to follow_pte() in order
to grab the page protections along with the PFN.

Fixes: bd2fae8da794 ("KVM: do not assume PTE is writable after follow_pfn")
Cc: David Stevens <>
Cc: Jann Horn <>
Cc: Jason Gunthorpe <>
Cc: Paolo Bonzini <>
Signed-off-by: Sean Christopherson <>

Paolo, maybe you can squash this with the appropriate acks?

mm/memory.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/mm/memory.c b/mm/memory.c
index feff48e1465a..15cbd10afd59 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4775,6 +4775,7 @@ int follow_pte(struct mm_struct *mm, unsigned long address,
return -EINVAL;

* follow_pfn - look up PFN at a user virtual address
 \ /
  Last update: 2021-02-04 18:19    [W:0.094 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site