KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections
PATCH 1/1 KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections
.hyp.event_ids is mapped as part of .hyp.rodata. As a consequence this section does not need any page-alignment. Remove it to save a page worth of memory.
--- arch/arm64/kernel/vmlinux.lds.S | 2 +- arch/arm64/kvm/hyp/nvhe/hyp.lds.S | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
arch/arm64/kernel/vmlinux.lds.S +1 -1
@@ -15,7 +15,7 @@ #ifdef CONFIG_NVHE_EL2_TRACING #define HYPERVISOR_EVENT_IDS \ - . = ALIGN(PAGE_SIZE); \ + . = ALIGN(SZ_8); \ __hyp_event_ids_start = .; \ *(HYP_SECTION_NAME(.event_ids)) \ __hyp_event_ids_end = .;
arch/arm64/kvm/hyp/nvhe/hyp.lds.S +0 -1
@@ -17,7 +17,6 @@ SECTIONS { HYP_SECTION(.data..ro_after_init) HYP_SECTION(.rodata) #ifdef CONFIG_NVHE_EL2_TRACING - . = ALIGN(PAGE_SIZE); BEGIN_HYP_SECTION(.event_ids) *(SORT(.hyp.event_ids.*)) END_HYP_SECTION
base-commit: 93f51579e7df248780214094418f205253383cc5
Signature · 1 line
2.56.0.rc1.310.g51773c2048-goog
Hi Vincent,
Quoted 5 lines · Vincent Donnefort
.hyp.event_ids is mapped as part of .hyp.rodata. As a consequence this section does not need any page-alignment. Remove it to save a page worth of memory.
Fixes 0a90fbc8a170 ("KVM: arm64: Add event support to the nVHE/pKVM hyp and trace remote")
Could you either drop the Fixes: tag or say in the message what goes wrong without this patch? As it stands the message describes a one-page saving, and the tag makes it a candidate for stable.
With that:
Tested with the hypervisor remote ftrace selftests, in pKVM and in nVHE:
Cheers,
/fuad
Marc Zyngier
maintainerQuoted 9 lines · Fuad Tabba
Hi Vincent,
Quoted 4 lines · Vincent Donnefort
.hyp.event_ids is mapped as part of .hyp.rodata. As a consequence this section does not need any page-alignment. Remove it to save a page worth of memory.
Quoted 5 lines
Quoted 1 line
Fixes 0a90fbc8a170 ("KVM: arm64: Add event support to the nVHE/pKVM hyp and trace remote")Could you either drop the Fixes: tag or say in the message what goes wrong without this patch? As it stands the message describes a one-page saving, and the tag makes it a candidate for stable.
I've dropped the tag when applying the patch.
Thanks,
M.
Signature · 1 line
Jazz isn't dead. It just smells funny.
Quoted 3 lines · Vincent Donnefort
.hyp.event_ids is mapped as part of .hyp.rodata. As a consequence this section does not need any page-alignment. Remove it to save a page worth of memory.
Applied to next, thanks!
[1/1] KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections
commit: 8642afb74be6de014e49937c2c4de7576f45531c
Cheers,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.