xen: make debugreg accessors always_inline
Subsystems (2)
Juergen Gross
maintainercover xen: make debugreg accessors always_inline
Juergen Gross (2):
xen: make HYPERVISOR_get_debugreg() always_inline
xen: make HYPERVISOR_set_debugreg() always_inline
arch/x86/include/asm/xen/hypercall.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2
Juergen Gross
maintainerPATCH 1/2 xen: make HYPERVISOR_get_debugreg() always_inline
HYPERVISOR_get_debugreg() is being called from noinstr code, so it should be attributed "always_inline".
--- arch/x86/include/asm/xen/hypercall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/xen/hypercall.h +1 -1
@@ -287,7 +287,7 @@ HYPERVISOR_set_debugreg(int reg, unsigned long value)return _hypercall2 (int, set_debugreg, reg, value); } -static inline unsigned long +static __always_inline unsigned long HYPERVISOR_get_debugreg (int reg) { return _hypercall1(unsigned long, get_debugreg, reg);
Signature · 1 line
2.26.2
Re: [PATCH 1/2] xen: make HYPERVISOR_get_debugreg() always_inline
Quoted 15 lines · Juergen Gross
HYPERVISOR_get_debugreg()is being called from noinstr code, so it should be attributed "always_inline".Fixes f4afb713e5c3a4419ba ("x86/xen: Make get_debugreg() noinstr")Reported-by kernel test robot <[email protected]>Signed-off-by Juergen Gross <[email protected]>--- arch/x86/include/asm/xen/hypercall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/include/asm/xen/hypercall.h +0
-0
arch/x86/include/asm/xen/hypercall.h HYPERVISOR_set_debugreg(int reg, unsigned long value) · line 293
Quoted 8 lines
arch/x86/include/asm/xen/hypercall.h +1
-1@@ -287,7 +287,7 @@ HYPERVISOR_set_debugreg(int reg, unsigned long value)return _hypercall2 (int, set_debugreg, reg, value); } -static inline unsigned long +static __always_inline unsigned long HYPERVISOR_get_debugreg (int reg) { return _hypercall1(unsigned long, get_debugreg, reg);
All this is going to do is push the error one step further in.
Next, objtool will complain that hypercall_page isn't noinstr.
~Andrew
Juergen Gross
maintainerRe: [PATCH 1/2] xen: make HYPERVISOR_get_debugreg() always_inline
Quoted 27 lines · Andrew Cooper
Quoted 15 lines · Juergen Gross
HYPERVISOR_get_debugreg()is being called from noinstr code, so it should be attributed "always_inline".Fixes f4afb713e5c3a4419ba ("x86/xen: Make get_debugreg() noinstr")Reported-by kernel test robot <[email protected]>Signed-off-by Juergen Gross <[email protected]>--- arch/x86/include/asm/xen/hypercall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/include/asm/xen/hypercall.h +0
-0arch/x86/include/asm/xen/hypercall.h HYPERVISOR_set_debugreg(int reg, unsigned long value) · line 293
Quoted 8 lines
arch/x86/include/asm/xen/hypercall.h +1
-1@@ -287,7 +287,7 @@ HYPERVISOR_set_debugreg(int reg, unsigned long value)return _hypercall2 (int, set_debugreg, reg, value); } -static inline unsigned long +static __always_inline unsigned long HYPERVISOR_get_debugreg (int reg) { return _hypercall1(unsigned long, get_debugreg, reg);All this is going to do is push the error one step further in.
Quoted 1 line
Next, objtool will complain that
hypercall_pageisn't noinstr.
I don't think so:
.pushsection .noinstr.text, "ax"
.balign PAGE_SIZESYM_CODE_START(hypercall_page)
.rept (PAGE_SIZE / 32)
UNWIND_HINT_FUNC
.skip 31, 0x90
ret
.endrJuergen
Re: [PATCH 1/2] xen: make HYPERVISOR_get_debugreg() always_inline
Quoted 33 lines · Juergen Gross
Quoted 28 lines · Andrew Cooper
Quoted 19 lines · Juergen Gross
HYPERVISOR_get_debugreg()is being called from noinstr code, so it should be attributed "always_inline".Fixes f4afb713e5c3a4419ba ("x86/xen: Make get_debugreg() noinstr")Reported-by kernel test robot <[email protected]>Signed-off-by Juergen Gross <[email protected]>---
arch/x86/include/asm/xen/hypercall.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/include/asm/xen/hypercall.h +0
-0@@ -287,7 +287,7 @@ HYPERVISOR_set_debugreg(int reg, unsigned long value) return _hypercall2(int, set_debugreg, reg, value); }Quoted 5 lines
-static inline unsigned long
+static__always_inlineunsigned longHYPERVISOR_get_debugreg(int reg)
{
return_hypercall1(unsigned long, get_debugreg, reg);All this is going to do is push the error one step further in.
Quoted 1 line
Next, objtool will complain that
hypercall_pageisn't noinstr.I don't think so:
Quoted 8 lines
.pushsection .noinstr.text, "ax"
.balignPAGE_SIZESYM_CODE_START(hypercall_page)
.rept (PAGE_SIZE/ 32)
UNWIND_HINT_FUNC
.skip 31,0x90
ret
.endr
/sigh yes. It would help if I was reading an up to date tree.
Sorry for the noise.
~Andrew
Juergen Gross
maintainerPATCH 2/2 xen: make HYPERVISOR_set_debugreg() always_inline
In reply to Juergen GrossHYPERVISOR_set_debugreg() is being called from noinstr code, so it should be attributed "always_inline".
--- arch/x86/include/asm/xen/hypercall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/xen/hypercall.h +1 -1
@@ -281,7 +281,7 @@ HYPERVISOR_callback_op(int cmd, void *arg)return _hypercall2 (int, callback_op, cmd, arg); } -static inline int +static __always_inline intHYPERVISOR_set_debugreg (int reg,unsigned long value) {return _hypercall2 (int, set_debugreg, reg, value);
Signature · 1 line
2.26.2
Quoted 6 lines · Juergen Gross
Juergen Gross (2):
xen: makeHYPERVISOR_get_debugreg()always_inline
xen: makeHYPERVISOR_set_debugreg()always_inlinearch/x86/include/asm/xen/hypercall.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 6 lines · Juergen Gross
Juergen Gross (2):
xen: makeHYPERVISOR_get_debugreg()always_inline
xen: makeHYPERVISOR_set_debugreg()always_inlinearch/x86/include/asm/xen/hypercall.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to for-linus-5.16c
-boris