From nobody Tue Feb 10 09:43:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1770140865317886.5992685234368; Tue, 3 Feb 2026 09:47:45 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1219609.1528483 (Exim 4.92) (envelope-from ) id 1vnKUm-00065c-BP; Tue, 03 Feb 2026 17:47:24 +0000 Received: by outflank-mailman (output) from mailman id 1219609.1528483; Tue, 03 Feb 2026 17:47:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vnKUm-00065V-5y; Tue, 03 Feb 2026 17:47:24 +0000 Received: by outflank-mailman (input) for mailman id 1219609; Tue, 03 Feb 2026 17:47:22 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vnKMb-0000Zt-QJ for xen-devel@lists.xenproject.org; Tue, 03 Feb 2026 17:38:57 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 3616fea1-0127-11f1-9ccf-f158ae23cfc8; Tue, 03 Feb 2026 18:38:54 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 33F89339; Tue, 3 Feb 2026 09:38:48 -0800 (PST) Received: from C3HXLD123V.arm.com (unknown [10.57.54.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 76D9F3F632; Tue, 3 Feb 2026 09:38:53 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3616fea1-0127-11f1-9ccf-f158ae23cfc8 From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: Volodymyr Babchuk , Jens Wiklander , Stefano Stabellini , Julien Grall , Michal Orzel Subject: [PATCH 10/12] xen/arm: ffa: Reduce logging noise Date: Tue, 3 Feb 2026 18:38:05 +0100 Message-ID: <38d71ac53abeeb4598d6ffb6bdab3717b3531334.1770115302.git.bertrand.marquis@arm.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1770140867843158500 Content-Type: text/plain; charset="utf-8" Several FF-A paths log warnings for expected or recoverable conditions, leading to noisy logs during normal operation. Reduce log noise by: - demoting unhandled FID warnings to debug - ratelimiting notification and VM teardown failures - printing the bit-15 convention warning once per boot - adjusting log prefixes for hypervisor-only events - adding debug diagnostics for RX/TX acquire failures, with busy cases ratelimited No functional changes. Signed-off-by: Bertrand Marquis --- xen/arch/arm/tee/ffa.c | 11 ++++++----- xen/arch/arm/tee/ffa_notif.c | 11 ++++++----- xen/arch/arm/tee/ffa_partinfo.c | 15 ++++++++------- xen/arch/arm/tee/ffa_rxtx.c | 21 +++++++++++++++++++-- 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index a46c6e5e67f1..d0b9c9f1ab2e 100644 --- a/xen/arch/arm/tee/ffa.c +++ b/xen/arch/arm/tee/ffa.c @@ -461,7 +461,7 @@ static bool ffa_handle_call(struct cpu_user_regs *regs) break; =20 default: - gprintk(XENLOG_ERR, "ffa: unhandled fid 0x%x\n", fid); + gdprintk(XENLOG_DEBUG, "ffa: unhandled fid 0x%x\n", fid); e =3D FFA_RET_NOT_SUPPORTED; break; } @@ -581,7 +581,8 @@ static void ffa_domain_teardown_continue(struct ffa_ctx= *ctx, bool first_time) =20 if ( retry ) { - printk(XENLOG_G_INFO "%pd: ffa: Remaining cleanup, retrying\n", ct= x->teardown_d); + printk(XENLOG_G_DEBUG "%pd: ffa: Remaining cleanup, retrying\n", + ctx->teardown_d); =20 ctx->teardown_expire =3D NOW() + FFA_CTX_TEARDOWN_DELAY; =20 @@ -622,7 +623,7 @@ static void ffa_teardown_timer_callback(void *arg) if ( ctx ) ffa_domain_teardown_continue(ctx, false /* !first_time */); else - printk(XENLOG_G_ERR "%s: teardown list is empty\n", __func__); + printk(XENLOG_ERR "%s: teardown list is empty\n", __func__); } =20 /* This function is supposed to undo what ffa_domain_init() has done */ @@ -684,7 +685,7 @@ static bool ffa_probe_fw(void) =20 if ( !ffa_get_version(&vers) ) { - gprintk(XENLOG_ERR, "Cannot retrieve the FFA version\n"); + printk(XENLOG_ERR "ffa: Cannot retrieve the FFA version\n"); goto err_no_fw; } =20 @@ -724,7 +725,7 @@ static bool ffa_probe_fw(void) set_bit(FFA_ABI_BITNUM(ffa_fw_abi_needed[i].id), ffa_fw_abi_supported); else - printk(XENLOG_INFO "ARM FF-A Firmware does not support %s\n", + printk(XENLOG_WARNING "ARM FF-A Firmware does not support %s\n= ", ffa_fw_abi_needed[i].name); } =20 diff --git a/xen/arch/arm/tee/ffa_notif.c b/xen/arch/arm/tee/ffa_notif.c index 37b05747cd21..186e72641237 100644 --- a/xen/arch/arm/tee/ffa_notif.c +++ b/xen/arch/arm/tee/ffa_notif.c @@ -292,8 +292,9 @@ static void notif_vm_pend_intr(uint16_t vm_id) break; } } - if ( !v ) - printk(XENLOG_ERR "ffa: can't inject NPI, all vCPUs offline\n"); + if ( !v && printk_ratelimit() ) + printk(XENLOG_G_DEBUG "%pd: ffa: can't inject NPI, all vCPUs offli= ne\n", + d); =20 out_unlock: rcu_unlock_domain(d); @@ -316,9 +317,9 @@ static void notif_sri_action(void *unused) res =3D ffa_get_ret_code(&resp); if ( res ) { - if ( res !=3D FFA_RET_NO_DATA ) - printk(XENLOG_ERR "ffa: notification info get failed: erro= r %d\n", - res); + if ( res !=3D FFA_RET_NO_DATA && printk_ratelimit() ) + printk(XENLOG_WARNING + "ffa: notification info get failed: error %d\n", re= s); return; } =20 diff --git a/xen/arch/arm/tee/ffa_partinfo.c b/xen/arch/arm/tee/ffa_partinf= o.c index 6b01c4abe915..c9f186b3720c 100644 --- a/xen/arch/arm/tee/ffa_partinfo.c +++ b/xen/arch/arm/tee/ffa_partinfo.c @@ -461,9 +461,11 @@ static bool init_subscribers(void *buf, uint16_t count= , uint32_t fpi_size) */ if ( !FFA_ID_IS_SECURE(fpi->id) ) { - printk(XENLOG_ERR "ffa: Firmware is not using bit 15 conventio= n for IDs !!\n" - "ffa: Secure partition with id 0x%04x cannot= be used\n", - fpi->id); + printk_once(XENLOG_ERR + "ffa: Firmware is not using bit 15 convention for = IDs !!\n"); + printk(XENLOG_ERR + "ffa: Secure partition with id 0x%04x cannot be used\n", + fpi->id); } else { @@ -632,11 +634,10 @@ bool ffa_partinfo_domain_destroy(struct domain *d) res =3D ffa_direct_req_send_vm(subscr_vm_destroyed[n], ffa_get_vm_= id(d), FFA_MSG_SEND_VM_DESTROYED); =20 - if ( res ) - { - printk(XENLOG_ERR "%pd: ffa: Failed to report destruction of v= m_id %u to %u: res %d\n", + if ( res && printk_ratelimit() ) + printk(XENLOG_WARNING + "%pd: ffa: Failed to report destruction of vm_id %u to = %u: res %d\n", d, ffa_get_vm_id(d), subscr_vm_destroyed[n], res); - } =20 /* * For these two error codes the hypervisor is expected to resend diff --git a/xen/arch/arm/tee/ffa_rxtx.c b/xen/arch/arm/tee/ffa_rxtx.c index 450ce102cbdc..3147aba21ddf 100644 --- a/xen/arch/arm/tee/ffa_rxtx.c +++ b/xen/arch/arm/tee/ffa_rxtx.c @@ -4,6 +4,7 @@ */ =20 #include +#include #include #include #include @@ -82,8 +83,9 @@ int32_t ffa_handle_rxtx_map(uint32_t fid, register_t tx_a= ddr, =20 if ( page_count > FFA_MAX_RXTX_PAGE_COUNT || !page_count ) { - printk(XENLOG_ERR "ffa: RXTX_MAP: error: %u pages requested (limit= %u)\n", - page_count, FFA_MAX_RXTX_PAGE_COUNT); + gdprintk(XENLOG_DEBUG, + "ffa: RXTX_MAP: error: %u pages requested (limit %u)\n", + page_count, FFA_MAX_RXTX_PAGE_COUNT); return FFA_RET_INVALID_PARAMETERS; } =20 @@ -303,12 +305,15 @@ int32_t ffa_rx_acquire(struct ffa_ctx *ctx, void **bu= f, size_t *buf_size) if ( !ctx->page_count ) { ret =3D FFA_RET_DENIED; + gdprintk(XENLOG_DEBUG, "ffa: RX acquire denied, no RX/TX mapped\n"= ); goto out; } =20 if ( !ctx->rx_is_free ) { ret =3D FFA_RET_BUSY; + if ( printk_ratelimit() ) + gdprintk(XENLOG_DEBUG, "ffa: RX acquire busy\n"); goto out; } =20 @@ -316,7 +321,10 @@ int32_t ffa_rx_acquire(struct ffa_ctx *ctx, void **buf= , size_t *buf_size) { ret =3D ffa_simple_call(FFA_RX_ACQUIRE, ctx->ffa_id, 0, 0, 0); if ( ret !=3D FFA_RET_OK ) + { + gdprintk(XENLOG_DEBUG, "ffa: RX acquire failed: %d\n", ret); goto out; + } } ctx->rx_is_free =3D false; *buf =3D ctx->rx; @@ -355,13 +363,22 @@ int32_t ffa_tx_acquire(struct ffa_ctx *ctx, const voi= d **buf, size_t *buf_size) int32_t ret =3D FFA_RET_DENIED; =20 if ( !spin_trylock(&ctx->tx_lock) ) + { + gdprintk(XENLOG_DEBUG, "ffa: TX acquire busy\n"); return FFA_RET_BUSY; + } =20 if ( !ctx->page_count ) + { + gdprintk(XENLOG_DEBUG, "ffa: TX acquire denied, no RX/TX mapped\n"= ); goto err_unlock; + } =20 if ( !ctx->tx ) + { + gdprintk(XENLOG_DEBUG, "ffa: TX acquire denied, TX buffer missing\= n"); goto err_unlock; + } =20 *buf =3D ctx->tx; *buf_size =3D ctx->page_count * FFA_PAGE_SIZE; --=20 2.50.1 (Apple Git-155)