Skip to content

Commit ce993ca

Browse files
committed
KVM: use follow_pfnmap API
jira LE-3557 Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6 commit-author Peter Xu <[email protected]> commit 5731aac Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-5.14.0-570.26.1.el9_6/5731aacd.failed Use the new pfnmap API to allow huge MMIO mappings for VMs. The rest work is done perfectly on the other side (host_pfn_mapping_level()). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Peter Xu <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Alex Williamson <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Gavin Shan <[email protected]> Cc: Gerald Schaefer <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Niklas Schnelle <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Will Deacon <[email protected]> Cc: Zi Yan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> (cherry picked from commit 5731aac) Signed-off-by: Jonathan Maple <[email protected]> # Conflicts: # virt/kvm/kvm_main.c
1 parent e64e7d7 commit ce993ca

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
KVM: use follow_pfnmap API
2+
3+
jira LE-3557
4+
Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6
5+
commit-author Peter Xu <[email protected]>
6+
commit 5731aacd54a883dd2c1a5e8c85e1fe78fc728dc7
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-5.14.0-570.26.1.el9_6/5731aacd.failed
10+
11+
Use the new pfnmap API to allow huge MMIO mappings for VMs. The rest work
12+
is done perfectly on the other side (host_pfn_mapping_level()).
13+
14+
Link: https://lkml.kernel.org/r/[email protected]
15+
Signed-off-by: Peter Xu <[email protected]>
16+
Cc: Paolo Bonzini <[email protected]>
17+
Cc: Sean Christopherson <[email protected]>
18+
Cc: Alexander Gordeev <[email protected]>
19+
Cc: Alex Williamson <[email protected]>
20+
Cc: Aneesh Kumar K.V <[email protected]>
21+
Cc: Borislav Petkov <[email protected]>
22+
Cc: Catalin Marinas <[email protected]>
23+
Cc: Christian Borntraeger <[email protected]>
24+
Cc: Dave Hansen <[email protected]>
25+
Cc: David Hildenbrand <[email protected]>
26+
Cc: Gavin Shan <[email protected]>
27+
Cc: Gerald Schaefer <[email protected]>
28+
Cc: Heiko Carstens <[email protected]>
29+
Cc: Ingo Molnar <[email protected]>
30+
Cc: Jason Gunthorpe <[email protected]>
31+
Cc: Matthew Wilcox <[email protected]>
32+
Cc: Niklas Schnelle <[email protected]>
33+
Cc: Ryan Roberts <[email protected]>
34+
Cc: Sven Schnelle <[email protected]>
35+
Cc: Thomas Gleixner <[email protected]>
36+
Cc: Vasily Gorbik <[email protected]>
37+
Cc: Will Deacon <[email protected]>
38+
Cc: Zi Yan <[email protected]>
39+
Signed-off-by: Andrew Morton <[email protected]>
40+
(cherry picked from commit 5731aacd54a883dd2c1a5e8c85e1fe78fc728dc7)
41+
Signed-off-by: Jonathan Maple <[email protected]>
42+
43+
# Conflicts:
44+
# virt/kvm/kvm_main.c
45+
diff --cc virt/kvm/kvm_main.c
46+
index b163a079fe65,f416d5e3f9c0..000000000000
47+
--- a/virt/kvm/kvm_main.c
48+
+++ b/virt/kvm/kvm_main.c
49+
@@@ -2878,13 -2860,11 +2878,15 @@@ static int hva_to_pfn_remapped(struct v
50+
unsigned long addr, bool write_fault,
51+
bool *writable, kvm_pfn_t *p_pfn)
52+
{
53+
+ struct follow_pfnmap_args args = { .vma = vma, .address = addr };
54+
kvm_pfn_t pfn;
55+
- pte_t *ptep;
56+
- pte_t pte;
57+
- spinlock_t *ptl;
58+
int r;
59+
60+
++<<<<<<< HEAD
61+
+ r = follow_pte(vma->vm_mm, addr, &ptep, &ptl);
62+
++=======
63+
+ r = follow_pfnmap_start(&args);
64+
++>>>>>>> 5731aacd54a8 (KVM: use follow_pfnmap API)
65+
if (r) {
66+
/*
67+
* get_user_pages fails for VM_IO and VM_PFNMAP vmas and does
68+
@@@ -2899,7 -2879,7 +2901,11 @@@
69+
if (r)
70+
return r;
71+
72+
++<<<<<<< HEAD
73+
+ r = follow_pte(vma->vm_mm, addr, &ptep, &ptl);
74+
++=======
75+
+ r = follow_pfnmap_start(&args);
76+
++>>>>>>> 5731aacd54a8 (KVM: use follow_pfnmap API)
77+
if (r)
78+
return r;
79+
}
80+
* Unmerged path virt/kvm/kvm_main.c

0 commit comments

Comments
 (0)