On Thu, Nov 24, 2022 at 11:18:52AM +0100, Juergen Gross wrote:
On 24.11.22 09:51, Hou Wenlong wrote:The corresponding C structure paravirt_patch_site is not packed, Before this,
Similar to the alternative patching, use relative reference for original
instruction rather than absolute one, which saves 8 bytes for one entry
on x86_64. And it could generate R_X86_64_PC32 relocation instead of
8 bytes saved? I think those are 4 bytes only.
its size is 16 bytes in x86_64,due to the alignment of 8 bytes. Now the alignment
is 4 bytes, so the size is 8 bytes.
OK, since the aligment is 4 bytes now, it seems that _ASM_ALIGN couldR_X86_64_64 relocation, which also reduces relocation metadata on
relocatable builds.
Signed-off-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx>
---
arch/x86/include/asm/paravirt.h | 6 +++---
arch/x86/include/asm/paravirt_types.h | 4 ++--
arch/x86/kernel/alternative.c | 8 +++++---
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 2851bc2339d5..2cbe9b64e103 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -735,13 +735,13 @@ extern void default_banner(void);
#else /* __ASSEMBLY__ */
-#define _PVSITE(ptype, ops, word, algn) \
+#define _PVSITE(ptype, ops, algn) \
Would you please drop the algn parameter, too? It isn't needed anymore
as the alignment can be hard coded to be 4 now. This would need to be
adjusted in the _paravirt_alt() macro, too.
be dropped too?
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature