* [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones
@ 2018-06-25 10:29 Jan Beulich
0 siblings, 0 replies; 2+ 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] 2+ messages in thread
* Re: [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones
[not found] <5B30C3F102000078001CD6F1@suse.com>
@ 2018-07-02 13:53 ` Juergen Gross
0 siblings, 0 replies; 2+ messages in thread
From: Juergen Gross @ 2018-07-02 13:53 UTC (permalink / raw)
To: Jan Beulich, Alok Kataria; +Cc: virtualization
On 25/06/18 12:29, 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>
Juergen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-02 13:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5B30C3F102000078001CD6F1@suse.com>
2018-07-02 13:53 ` [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones Juergen Gross
2018-06-25 10:29 Jan Beulich
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).