[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 8/9] x86/xen: Convert xen_mm_pin_all() to ptdescs



Convert xen_mm_pin_all() to ptdescs in preparation for the eventual
splitting of ptdescs from struct page. Continue checking PagePinned
through the underlying page as we do not have a per-memdesc api for
page flags yet.

Signed-off-by: Vishal Moola <vishal.moola@xxxxxxxxx>
---
 arch/x86/xen/mmu_pv.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
index 3eee5f84f8a7..b2f6e7b7c545 100644
--- a/arch/x86/xen/mmu_pv.c
+++ b/arch/x86/xen/mmu_pv.c
@@ -828,15 +828,15 @@ static void xen_pgd_pin(struct mm_struct *mm)
  */
 void xen_mm_pin_all(void)
 {
-       struct page *page;
+       struct ptdesc *ptdesc;
 
        spin_lock(&init_mm.page_table_lock);
        spin_lock(&pgd_lock);
 
-       list_for_each_entry(page, &pgd_list, lru) {
-               if (!PagePinned(page)) {
-                       __xen_pgd_pin(&init_mm, (pgd_t *)page_address(page));
-                       SetPageSavePinned(page);
+       list_for_each_entry(ptdesc, &pgd_list, pt_list) {
+               if (!PagePinned(ptdesc_page(ptdesc))) {
+                       __xen_pgd_pin(&init_mm, (pgd_t 
*)ptdesc_address(ptdesc));
+                       SetPageSavePinned(ptdesc_page(ptdesc));
                }
        }
 
-- 
2.54.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.