Skip to contentSkip to conversation

CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM

PATCH Applied Stefano Stabellini 2 participants 3 messages Oct 31, 2018 – Nov 6, 2018 Xen hypervisor interface

lore
Share & tools
lore

Stefano Stabellini

author maintainer
#0 lore raw

PATCH v3 1/1 CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM

From: Stefano Stabellini <[email protected]>

xen_create_contiguous_region has now only an implementation if CONFIG_XEN_PV is defined. However, on ARM we never set CONFIG_XEN_PV but we do have an implementation of xen_create_contiguous_region which is required for swiotlb-xen to work correctly (although it just sets *dma_handle).

Fixes 16624390816c ("xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds")

---
Changes in v3:
- remove stub implentation of xen_remap_pfn, split #ifdef instead

---
 include/xen/xen-ops.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
include/xen/xen-ops.h +7 -5
index 18803ff..4969817 100644
@@ -42,16 +42,12 @@ static inline uint32_t xen_vcpu_nr(int cpu)
 
 extern unsigned long *xen_contiguous_bitmap;
 
-#ifdef CONFIG_XEN_PV
+#if defined(CONFIG_XEN_PV) || defined(CONFIG_ARM) || defined(CONFIG_ARM64)
 int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
 				unsigned int address_bits,
 				dma_addr_t *dma_handle);
 
 void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order);
-
-int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
-		  xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot,
-		  unsigned int domid, bool no_translate, struct page **pages);
 #else
 static inline int xen_create_contiguous_region(phys_addr_t pstart,
 					       unsigned int order,
@@ -63,7 +59,13 @@ static inline int xen_create_contiguous_region(phys_addr_t pstart,
 
 static inline void xen_destroy_contiguous_region(phys_addr_t pstart,
 						 unsigned int order) { }
+#endif
 
+#if defined(CONFIG_XEN_PV)
+int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
+		  xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot,
+		  unsigned int domid, bool no_translate, struct page **pages);
+#else
 static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
 				xen_pfn_t *pfn, int nr, int *err_ptr,
 				pgprot_t prot,  unsigned int domid,
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
maintainer Reviewed-by on v3 1/1
#1 lore raw
Quoted 8 lines · Stefano Stabellini

From: Stefano Stabellini <[email protected]>

xen_create_contiguous_region has now only an implementation if CONFIG_XEN_PV is defined. However, on ARM we never set CONFIG_XEN_PV but we do have an implementation of xen_create_contiguous_region which is required for swiotlb-xen to work correctly (although it just sets *dma_handle).

Quoted 9 lines
Fixes 16624390816c ("xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds")

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

maintainer Applied
#2 lore raw
In reply to Stefano Stabellini
Quoted 10 lines · Stefano Stabellini

From: Stefano Stabellini <[email protected]>

xen_create_contiguous_region has now only an implementation if CONFIG_XEN_PV is defined. However, on ARM we never set CONFIG_XEN_PV but we do have an implementation of xen_create_contiguous_region which is required for swiotlb-xen to work correctly (although it just sets *dma_handle).

Fixes 16624390816c ("xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds")

Pushed to xen.git for-linus-4.20a

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel