git: 99332926f6fc - main - amd64: also limit printings of EFIRT page faults
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Apr 2025 07:37:42 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=99332926f6fc6d1e4bb850a2b26744b948b14014
commit 99332926f6fc6d1e4bb850a2b26744b948b14014
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-04-09 07:35:56 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-04-09 07:35:56 +0000
amd64: also limit printings of EFIRT page faults
Fixes: fd748c7d5b7aefbeda604403f203637b12ae89df
Sponsored by: The FreeBSD Foundation
PR: 285797
MFC after: 1 week
---
sys/amd64/amd64/trap.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 1041422b9f92..a400b8a2c022 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -869,8 +869,13 @@ after_vmfault:
if (td->td_intr_nesting_level == 0 &&
curpcb->pcb_onfault != NULL) {
if ((td->td_pflags & TDP_EFIRT) != 0) {
- trap_diag(frame, eva);
- printf("EFI RT page fault\n");
+ u_long cnt = atomic_fetchadd_long(&cnt_efirt_faults, 1);
+
+ if ((print_efirt_faults == 1 && cnt == 1) ||
+ print_efirt_faults == 2) {
+ trap_diag(frame, eva);
+ printf("EFI RT page fault\n");
+ }
}
frame->tf_rip = (long)curpcb->pcb_onfault;
return (0);