summaryrefslogtreecommitdiff
path: root/include/xen
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2020-12-07 09:36:14 +0100
committerJuergen Gross <jgross@suse.com>2020-12-09 10:31:41 +0100
commitee32f32335e8c7f6154bf397f4ac9b6175b488a8 (patch)
treef9283878959d530f26cfe002fb2b764b814ec0b6 /include/xen
parentca33479cc7be2c9b5f8be078c8bf3ac26b7d6186 (diff)
downloadlwn-ee32f32335e8c7f6154bf397f4ac9b6175b488a8.tar.gz
lwn-ee32f32335e8c7f6154bf397f4ac9b6175b488a8.zip
xen: don't use page->lru for ZONE_DEVICE memory
Commit 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated memory") introduced usage of ZONE_DEVICE memory for foreign memory mappings. Unfortunately this collides with using page->lru for Xen backend private page caches. Fix that by using page->zone_device_data instead. Cc: <stable@vger.kernel.org> # 5.9 Fixes: 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated memory") Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovksy@oracle.com> Reviewed-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/grant_table.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h
index c6ef8ffc1a09..b9c937b3a149 100644
--- a/include/xen/grant_table.h
+++ b/include/xen/grant_table.h
@@ -200,7 +200,11 @@ void gnttab_free_pages(int nr_pages, struct page **pages);
struct gnttab_page_cache {
spinlock_t lock;
+#ifdef CONFIG_XEN_UNPOPULATED_ALLOC
+ struct page *pages;
+#else
struct list_head pages;
+#endif
unsigned int num_pages;
};