xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM
@ 2018-10-31 23:11 Stefano Stabellini
  2018-11-02 16:16 ` Juergen Gross
  2018-11-06  9:35 ` Juergen Gross
  0 siblings, 2 replies; 3+ messages in thread
From: Stefano Stabellini @ 2018-10-31 23:11 UTC (permalink / raw)
  To: xen-devel
  Cc: jgross, Stefano Stabellini, Nathan.Studer, Jeff.Kubascik,
	julien.grall, vkuznets, boris.ostrovsky, Jarvis.Roach

From: Stefano Stabellini <stefanos@xilinx.com>

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")
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
CC: Jeff.Kubascik@dornerworks.com
CC: Jarvis.Roach@dornerworks.com
CC: Nathan.Studer@dornerworks.com
CC: vkuznets@redhat.com
CC: boris.ostrovsky@oracle.com
CC: jgross@suse.com
CC: julien.grall@arm.com
---
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(-)

diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index 18803ff..4969817 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -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,
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM
  2018-10-31 23:11 [PATCH v3] CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM Stefano Stabellini
@ 2018-11-02 16:16 ` Juergen Gross
  2018-11-06  9:35 ` Juergen Gross
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2018-11-02 16:16 UTC (permalink / raw)
  To: Stefano Stabellini, xen-devel
  Cc: Stefano Stabellini, Nathan.Studer, Jeff.Kubascik, julien.grall,
	vkuznets, boris.ostrovsky, Jarvis.Roach

On 01/11/2018 00:11, Stefano Stabellini wrote:
> From: Stefano Stabellini <stefanos@xilinx.com>
> 
> 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")
> Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
> CC: Jeff.Kubascik@dornerworks.com
> CC: Jarvis.Roach@dornerworks.com
> CC: Nathan.Studer@dornerworks.com
> CC: vkuznets@redhat.com
> CC: boris.ostrovsky@oracle.com
> CC: jgross@suse.com
> CC: julien.grall@arm.com

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM
  2018-10-31 23:11 [PATCH v3] CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM Stefano Stabellini
  2018-11-02 16:16 ` Juergen Gross
@ 2018-11-06  9:35 ` Juergen Gross
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2018-11-06  9:35 UTC (permalink / raw)
  To: Stefano Stabellini, xen-devel
  Cc: Stefano Stabellini, Nathan.Studer, Jeff.Kubascik, julien.grall,
	vkuznets, boris.ostrovsky, Jarvis.Roach

On 01/11/2018 00:11, Stefano Stabellini wrote:
> From: Stefano Stabellini <stefanos@xilinx.com>
> 
> 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")
> Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>

Pushed to xen.git for-linus-4.20a


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-06  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-31 23:11 [PATCH v3] CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM Stefano Stabellini
2018-11-02 16:16 ` Juergen Gross
2018-11-06  9:35 ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).