Skip to contentSkip to conversation

don't compile XEN_TMEM on ARM adn ARM64

PATCH In review Stefano Stabellini 3 participants 5 messages Jun 24, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't compile XEN_TMEM on ARM adn ARM64

Hi Konrad,
XEN_TMEM doesn't work on ARM64. This commit break Xen ARM64 in linux-next:

commit 10a7a0771399a57a297fca9615450dbb3f88081a

Author: Dan Magenheimer <[email protected]>
Date:   Tue Apr 30 15:27:00 2013 -0700

xen: tmem: enable Xen tmem shim to be built/loaded as a module

I suggest fixing it by disabling XEN_TMEM on everything non-x86.

---

drivers/xen/Kconfig +1 -1
index 9e02d60..c1ac85b 100644
@@ -145,7 +145,7 @@ config SWIOTLB_XEN
 
 config XEN_TMEM
 	tristate
-	depends on !ARM
+	depends on X86
 	default m if (CLEANCACHE || FRONTSWAP)
 	help
 	  Shim to interface in-kernel Transcendent Memory hooks
#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Stefano Stabellini

Hi Konrad,
XEN_TMEM doesn't work on ARM64. This commit break Xen ARM64 in linux-next:

Quoted 7 lines

commit 10a7a0771399a57a297fca9615450dbb3f88081a

Author: Dan Magenheimer <[email protected]>
Date:   Tue Apr 30 15:27:00 2013 -0700

xen: tmem: enable Xen tmem shim to be built/loaded as a module

I suggest fixing it by disabling XEN_TMEM on everything non-x86.

That's pretty gross - the kernel side tmem code should be really architecture independent, so shouldn't even need the !ARM dependency.

Jan

Quoted 20 lines
drivers/xen/Kconfig +1 -1
index 9e02d60..c1ac85b 100644
@@ -145,7 +145,7 @@ config SWIOTLB_XEN
 
 config XEN_TMEM
 	tristate
-	depends on !ARM
+	depends on X86
 	default m if (CLEANCACHE || FRONTSWAP)
 	help
 	  Shim to interface in-kernel Transcendent Memory hooks

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
In reply to Stefano Stabellini
Quoted 11 lines · Stefano Stabellini

Hi Konrad,
XEN_TMEM doesn't work on ARM64. This commit break Xen ARM64 in linux-next:

commit 10a7a0771399a57a297fca9615450dbb3f88081a

Author: Dan Magenheimer <[email protected]>
Date:   Tue Apr 30 15:27:00 2013 -0700

xen: tmem: enable Xen tmem shim to be built/loaded as a module

I suggest fixing it by disabling XEN_TMEM on everything non-x86.

Hm, what is the compile issue?

Quoted 18 lines

---

drivers/xen/Kconfig +1 -1
index 9e02d60..c1ac85b 100644
@@ -145,7 +145,7 @@ config SWIOTLB_XEN
 
 config XEN_TMEM
 	tristate
-	depends on !ARM
+	depends on X86
 	default m if (CLEANCACHE || FRONTSWAP)
 	help
 	  Shim to interface in-kernel Transcendent Memory hooks
#3 lore raw
Quoted 9 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Stefano Stabellini

Hi Konrad,
XEN_TMEM doesn't work on ARM64. This commit break Xen ARM64 in linux-next:

commit 10a7a0771399a57a297fca9615450dbb3f88081a

Author: Dan Magenheimer <[email protected]>
Date:   Tue Apr 30 15:27:00 2013 -0700
Quoted 5 lines
Quoted 3 lines

xen: tmem: enable Xen tmem shim to be built/loaded as a module

I suggest fixing it by disabling XEN_TMEM on everything non-x86.

Hm, what is the compile issue?

drivers/xen/tmem.c: In function ‘xen_tmem_op’:
drivers/xen/tmem.c:105:2: error: implicit declaration of function ‘HYPERVISOR_tmem_op’ [-Werror=implicit-function-declaration]

Alternatively I can provide the implementation of HYPERVISOR_tmem_op.

---

arch/arm/include/asm/xen/hypercall.h +1 -0
index 799f42e..f546b27 100644
@@ -47,6 +47,7 @@ unsigned long HYPERVISOR_hvm_op(int op, void *arg);
 int HYPERVISOR_memory_op(unsigned int cmd, void *arg);
 int HYPERVISOR_physdev_op(int cmd, void *arg);
 int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args);
+int HYPERVISOR_tmem_op(void *arg);
 
 static inline void
 MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
arch/arm/xen/hypercall.S +1 -0
index 199cb2d..d1cf7b7 100644
@@ -88,6 +88,7 @@ HYPERCALL2(hvm_op);
 HYPERCALL2(memory_op);
 HYPERCALL2(physdev_op);
 HYPERCALL3(vcpu_op);
+HYPERCALL1(tmem_op);
 
 ENTRY(privcmd_call)
 	stmdb sp!, {r4}
arch/arm64/xen/hypercall.S +1 -0
index 2816c47..531342e 100644
@@ -79,6 +79,7 @@ HYPERCALL2(hvm_op);
 HYPERCALL2(memory_op);
 HYPERCALL2(physdev_op);
 HYPERCALL3(vcpu_op);
+HYPERCALL1(tmem_op);
 
 ENTRY(privcmd_call)
 	mov x16, x0

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw
Quoted 12 lines · Stefano Stabellini
Quoted 11 lines · Konrad Rzeszutek Wilk
Quoted 10 lines · Stefano Stabellini

Hi Konrad,
XEN_TMEM doesn't work on ARM64. This commit break Xen ARM64 in linux-next:

commit 10a7a0771399a57a297fca9615450dbb3f88081a

Author: Dan Magenheimer <[email protected]>
Date:   Tue Apr 30 15:27:00 2013 -0700

xen: tmem: enable Xen tmem shim to be built/loaded as a module

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

I suggest fixing it by disabling XEN_TMEM on everything non-x86.

Hm, what is the compile issue?

drivers/xen/tmem.c: In function ‘xen_tmem_op’:
drivers/xen/tmem.c:105:2: error: implicit declaration of function ‘HYPERVISOR_tmem_op’ [-Werror=implicit-function-declaration]

Alternatively I can provide the implementation of HYPERVISOR_tmem_op.

I think that might be better. Thanks!

Quoted 34 lines

---

arch/arm/include/asm/xen/hypercall.h +1 -0
index 799f42e..f546b27 100644
@@ -47,6 +47,7 @@ unsigned long HYPERVISOR_hvm_op(int op, void *arg);
 int HYPERVISOR_memory_op(unsigned int cmd, void *arg);
 int HYPERVISOR_physdev_op(int cmd, void *arg);
 int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args);
+int HYPERVISOR_tmem_op(void *arg);
 
 static inline void
 MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
arch/arm/xen/hypercall.S +1 -0
index 199cb2d..d1cf7b7 100644
@@ -88,6 +88,7 @@ HYPERCALL2(hvm_op);
 HYPERCALL2(memory_op);
 HYPERCALL2(physdev_op);
 HYPERCALL3(vcpu_op);
+HYPERCALL1(tmem_op);
 
 ENTRY(privcmd_call)
 	stmdb sp!, {r4}
arch/arm64/xen/hypercall.S +0 -0
index 2816c47..531342e 100644

arch/arm64/xen/hypercall.S HYPERCALL2(hvm_op); · line 85

Quoted 7 lines
arch/arm64/xen/hypercall.S +1 -0
@@ -79,6 +79,7 @@ HYPERCALL2(hvm_op);
 HYPERCALL2(memory_op);
 HYPERCALL2(physdev_op);
 HYPERCALL3(vcpu_op);
+HYPERCALL1(tmem_op);
 
 ENTRY(privcmd_call)
 	mov x16, x0

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel