All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones
@ 2018-06-25 10:29 Jan Beulich
  2018-08-15  8:09 ` [PATCH RESEND] " Jan Beulich
  2018-08-15  8:09 ` Jan Beulich
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2018-06-25 10:29 UTC (permalink / raw)
  To: Juergen Gross, Alok Kataria; +Cc: virtualization

This saves one insn byte per instance, summing up to a savings of over
4k in my (stripped down) configuration. No variant of to be patched in
replacement code relies on the one byte larger size.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 arch/x86/include/asm/paravirt_types.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- 4.18-rc2/arch/x86/include/asm/paravirt_types.h
+++ 4.18-rc2-x86_64-pvops-call-RIPrel/arch/x86/include/asm/paravirt_types.h
@@ -393,9 +393,15 @@ int paravirt_disable_iospace(void);
  * offset into the paravirt_patch_template structure, and can therefore be
  * freely converted back into a structure offset.
  */
+#ifdef CONFIG_X86_32
 #define PARAVIRT_CALL					\
 	ANNOTATE_RETPOLINE_SAFE				\
 	"call *%c[paravirt_opptr];"
+#else
+#define PARAVIRT_CALL					\
+	ANNOTATE_RETPOLINE_SAFE				\
+	"call *%c[paravirt_opptr](%%rip);"
+#endif
 
 /*
  * These macros are intended to wrap calls through one of the paravirt

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

* [PATCH RESEND] x86-64: use RIP-relative calls for paravirt indirect ones
  2018-06-25 10:29 [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones Jan Beulich
@ 2018-08-15  8:09 ` Jan Beulich
  2018-08-20 14:54     ` Thomas Gleixner
  2018-08-15  8:09 ` Jan Beulich
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2018-08-15  8:09 UTC (permalink / raw)
  To: the arch/x86 maintainers, Juergen Gross, Alok Kataria
  Cc: Linux Virtualization, linux-kernel, hpa

This saves one insn byte per instance, summing up to a savings of over
4k in my (stripped down) configuration. No variant of to be patched in
replacement code relies on the one byte larger size.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
---
Resend to include x86 maintainers, who aren't listed explicitly for the
file changed.
---
 arch/x86/include/asm/paravirt_types.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- 4.18/arch/x86/include/asm/paravirt_types.h
+++ 4.18-x86_64-pvops-call-RIPrel/arch/x86/include/asm/paravirt_types.h
@@ -393,9 +393,15 @@ int paravirt_disable_iospace(void);
  * offset into the paravirt_patch_template structure, and can therefore be
  * freely converted back into a structure offset.
  */
+#ifdef CONFIG_X86_32
 #define PARAVIRT_CALL					\
 	ANNOTATE_RETPOLINE_SAFE				\
 	"call *%c[paravirt_opptr];"
+#else
+#define PARAVIRT_CALL					\
+	ANNOTATE_RETPOLINE_SAFE				\
+	"call *%c[paravirt_opptr](%%rip);"
+#endif
 
 /*
  * These macros are intended to wrap calls through one of the paravirt



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

* [PATCH RESEND] x86-64: use RIP-relative calls for paravirt indirect ones
  2018-06-25 10:29 [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones Jan Beulich
  2018-08-15  8:09 ` [PATCH RESEND] " Jan Beulich
@ 2018-08-15  8:09 ` Jan Beulich
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2018-08-15  8:09 UTC (permalink / raw)
  To: the arch/x86 maintainers, Juergen Gross, Alok Kataria
  Cc: hpa, linux-kernel, Linux Virtualization

This saves one insn byte per instance, summing up to a savings of over
4k in my (stripped down) configuration. No variant of to be patched in
replacement code relies on the one byte larger size.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
---
Resend to include x86 maintainers, who aren't listed explicitly for the
file changed.
---
 arch/x86/include/asm/paravirt_types.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- 4.18/arch/x86/include/asm/paravirt_types.h
+++ 4.18-x86_64-pvops-call-RIPrel/arch/x86/include/asm/paravirt_types.h
@@ -393,9 +393,15 @@ int paravirt_disable_iospace(void);
  * offset into the paravirt_patch_template structure, and can therefore be
  * freely converted back into a structure offset.
  */
+#ifdef CONFIG_X86_32
 #define PARAVIRT_CALL					\
 	ANNOTATE_RETPOLINE_SAFE				\
 	"call *%c[paravirt_opptr];"
+#else
+#define PARAVIRT_CALL					\
+	ANNOTATE_RETPOLINE_SAFE				\
+	"call *%c[paravirt_opptr](%%rip);"
+#endif
 
 /*
  * These macros are intended to wrap calls through one of the paravirt

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

* Re: [PATCH RESEND] x86-64: use RIP-relative calls for paravirt indirect ones
  2018-08-15  8:09 ` [PATCH RESEND] " Jan Beulich
@ 2018-08-20 14:54     ` Thomas Gleixner
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2018-08-20 14:54 UTC (permalink / raw)
  To: Jan Beulich
  Cc: the arch/x86 maintainers, Juergen Gross, Alok Kataria,
	Linux Virtualization, linux-kernel, hpa

On Wed, 15 Aug 2018, Jan Beulich wrote:

> This saves one insn byte per instance, summing up to a savings of over
> 4k in my (stripped down) configuration. No variant of to be patched in
> replacement code relies on the one byte larger size.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Reviewed-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

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

* Re: [PATCH RESEND] x86-64: use RIP-relative calls for paravirt indirect ones
@ 2018-08-20 14:54     ` Thomas Gleixner
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2018-08-20 14:54 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Juergen Gross, the arch/x86 maintainers, linux-kernel,
	Linux Virtualization, hpa, Alok Kataria

On Wed, 15 Aug 2018, Jan Beulich wrote:

> This saves one insn byte per instance, summing up to a savings of over
> 4k in my (stripped down) configuration. No variant of to be patched in
> replacement code relies on the one byte larger size.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Reviewed-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

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

end of thread, other threads:[~2018-08-20 14:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 10:29 [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones Jan Beulich
2018-08-15  8:09 ` [PATCH RESEND] " Jan Beulich
2018-08-20 14:54   ` Thomas Gleixner
2018-08-20 14:54     ` Thomas Gleixner
2018-08-15  8:09 ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.