* [PATCH] KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections
@ 2026-09-24 9:51 Vincent Donnefort
2026-09-24 16:14 ` Fuad Tabba
2026-09-27 16:35 ` Marc Zyngier
0 siblings, 2 replies; 4+ messages in thread
From: Vincent Donnefort @ 2026-09-24 9:51 UTC (permalink / raw)
To: maz, oupton, kvmarm, linux-arm-kernel
Cc: joey.gouly, seiden, suzuki.poulose, yuzenghui, catalin.marinas,
will, kernel-team, fuad.tabba, 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")
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
---
arch/arm64/kernel/vmlinux.lds.S | 2 +-
arch/arm64/kvm/hyp/nvhe/hyp.lds.S | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index af1d72020976..c0b090db8be4 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -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 = .;
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp.lds.S b/arch/arm64/kvm/hyp/nvhe/hyp.lds.S
index 7a02837203d1..89222425359a 100644
--- a/arch/arm64/kvm/hyp/nvhe/hyp.lds.S
+++ b/arch/arm64/kvm/hyp/nvhe/hyp.lds.S
@@ -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
--
2.56.0.rc1.310.g51773c2048-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections
2026-09-24 9:51 [PATCH] KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections Vincent Donnefort
@ 2026-09-24 16:14 ` Fuad Tabba
2026-09-27 8:40 ` Marc Zyngier
2026-09-27 16:35 ` Marc Zyngier
1 sibling, 1 reply; 4+ messages in thread
From: Fuad Tabba @ 2026-09-24 16:14 UTC (permalink / raw)
To: Vincent Donnefort
Cc: maz, oupton, kvmarm, linux-arm-kernel, joey.gouly, seiden,
suzuki.poulose, yuzenghui, catalin.marinas, will, kernel-team
Hi Vincent,
On Thu, 24 Sep 2026 10:51:54 +0100, Vincent Donnefort
<vdonnefort@google.com> wrote:
> .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:
Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev>
Tested with the hypervisor remote ftrace selftests, in pKVM and in nVHE:
Tested-by: Fuad Tabba <fuad.tabba@linux.dev>
Cheers,
/fuad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections
2026-09-24 16:14 ` Fuad Tabba
@ 2026-09-27 8:40 ` Marc Zyngier
0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2026-09-27 8:40 UTC (permalink / raw)
To: Fuad Tabba
Cc: Vincent Donnefort, oupton, kvmarm, linux-arm-kernel, joey.gouly,
seiden, suzuki.poulose, yuzenghui, catalin.marinas, will,
kernel-team
On Thu, 24 Sep 2026 17:14:54 +0100,
Fuad Tabba <fuad.tabba@linux.dev> wrote:
>
> Hi Vincent,
>
> On Thu, 24 Sep 2026 10:51:54 +0100, Vincent Donnefort
> <vdonnefort@google.com> wrote:
> > .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.
I've dropped the tag when applying the patch.
Thanks,
M.
--
Jazz isn't dead. It just smells funny.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections
2026-09-24 9:51 [PATCH] KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections Vincent Donnefort
2026-09-24 16:14 ` Fuad Tabba
@ 2026-09-27 16:35 ` Marc Zyngier
1 sibling, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2026-09-27 16:35 UTC (permalink / raw)
To: oupton, kvmarm, linux-arm-kernel, Vincent Donnefort
Cc: joey.gouly, seiden, suzuki.poulose, yuzenghui, catalin.marinas,
will, kernel-team, fuad.tabba
On Thu, 24 Sep 2026 10:51:54 +0100, Vincent Donnefort wrote:
> .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.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-27 16:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24 9:51 [PATCH] KVM: arm64: Remove PAGE_SIZE alignment for hyp event ELF sections Vincent Donnefort
2026-09-24 16:14 ` Fuad Tabba
2026-09-27 8:40 ` Marc Zyngier
2026-09-27 16:35 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox