Skip to contentSkip to conversation

argo: few log fixes

PATCH Superseded [email protected] 3 participants 12 messages Jun 3 – Jun 4

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v4 cover argo: few log fixes

This series corrects Argo module tracing.

Patch 1 lowers the verbosity of a spammy log message.
Patch 2 corrects the debug logline.
Patch 3 cleans up existing loglines by dropping duplicate prefixes. Patch 4 re-wires argo_dprintk() to gprintk() to include mode debugging
context.
Patch 5 adds new Kconfig for short-circuiting extra verbose Argo traces. Patch 6 enables extra verbose Argo traces in CI for ease of catching
potential issues.

CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2571555053

Denis Mukhin (6):
argo: lower level of noisy connection-refused log
argo: correct logline in ring_unmap()
argo: drop argo prefix from argo_dprintk() calls
argo: fixup argo_dprintk()
argo: introduce CONFIG_ARGO_DEBUG
automation: enable Argo debugging in CI

 automation/gitlab-ci/analyze.yaml |  2 ++
 automation/gitlab-ci/build.yaml   |  1 +
 xen/common/Kconfig                |  5 +++++
 xen/common/argo.c                 | 22 ++++++++++------------
 4 files changed, 18 insertions(+), 12 deletions(-)
Signature · 1 line
2.54.0
#1 lore raw

PATCH v4 1/6 argo: lower level of noisy connection-refused log

Switch the log line to argo_dprintk() so it is enabled only in debug environments, as it can spam the logs when a dom0 service using the Argo hypercall tries to communicate with a domain that is still starting up.

Note that this also lowers the log level to debug when the argo_dprintk() facility is enabled.

---
Changes since v3:
- n/a

---
 xen/common/argo.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
xen/common/argo.c +3 -4
index 28626e00a8cb..98a3db7fd070 100644
@@ -2034,10 +2034,9 @@ sendv(struct domain *src_d, xen_argo_addr_t *src_addr,
                                         src_id.domain_id);
     if ( !ring_info )
     {
-        gprintk(XENLOG_ERR,
-                "argo: vm%u connection refused, src (vm%u:%x) dst (vm%u:%x)\n",
-                current->domain->domain_id, src_id.domain_id, src_id.aport,
-                dst_addr->domain_id, dst_addr->aport);
+        argo_dprintk("vm%u connection refused, src (vm%u:%x) dst (vm%u:%x)\n",
+                     current->domain->domain_id, src_id.domain_id, src_id.aport,
+                     dst_addr->domain_id, dst_addr->aport);
 
         ret = -ECONNREFUSED;
     }
Signature · 1 line
2.54.0
Reviewed-by on v4 1/6
#2 lore raw

Re: [PATCH v4 1/6] argo: lower level of noisy connection-refused log

Quoted 10 lines · On 2026-06-03 02:05, [email protected] wrote:

Switch the log line to argo_dprintk() so it is enabled only in debug environments, as it can spam the logs when a dom0 service using the Argo hypercall tries to communicate with a domain that is still starting up.

Note that this also lowers the log level to debug when the argo_dprintk() facility is enabled.

#3 lore raw

PATCH v4 2/6 argo: correct logline in ring_unmap()

In reply to [email protected]

Drop XENLOG_ERR from the logline since argo_dprintk() already injects the proper log level indicator.

Also, drop "argo: " prefix, since it is also injected by argo_dprintk()

---
Changes since v3:
- n/a

---
 xen/common/argo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/argo.c +1 -1
index 98a3db7fd070..5da14c929e14 100644
@@ -474,7 +474,7 @@ ring_unmap(const struct domain *d, struct argo_ring_info *ring_info)
             continue;
 
         ASSERT(!mfn_eq(ring_info->mfns[i], INVALID_MFN));
-        argo_dprintk(XENLOG_ERR "argo: unmapping page %"PRI_mfn" from %p\n",
+        argo_dprintk("unmapping page %"PRI_mfn" from %p\n",
                      mfn_x(ring_info->mfns[i]), ring_info->mfn_mapping[i]);
 
         unmap_domain_page_global(ring_info->mfn_mapping[i]);
Signature · 1 line
2.54.0
Reviewed-by on v4 2/6
#4 lore raw

Re: [PATCH v4 2/6] argo: correct logline in ring_unmap()

Quoted 8 lines · On 2026-06-03 02:05, [email protected] wrote:

Drop XENLOG_ERR from the logline since argo_dprintk() already injects the proper log level indicator.

Also, drop "argo: " prefix, since it is also injected by argo_dprintk()

#5 lore raw

PATCH v4 3/6 argo: drop argo prefix from argo_dprintk() calls

In reply to [email protected]

argo_dprintk() prefixes all log lines with "argo: " automatically.

Remove duplicate prefixes from log messages in the Argo module where applicable.

---
Changes since v3:
- n/a

---
 xen/common/argo.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
xen/common/argo.c +4 -4
index 5da14c929e14..ffa1f43437ab 100644
@@ -1467,7 +1467,7 @@ find_ring_mfns(struct domain *d, struct argo_ring_info *ring_info,
     if ( ring_info->mfns )
     {
         /* Ring already existed: drop the previous mapping. */
-        argo_dprintk("argo: vm%u re-register existing ring "
+        argo_dprintk("vm%u re-register existing ring "
                      "(vm%u:%x vm%u) clears mapping\n",
                      d->domain_id, ring_info->id.domain_id,
                      ring_info->id.aport, ring_info->id.partner_id);
@@ -1527,7 +1527,7 @@ find_ring_mfns(struct domain *d, struct argo_ring_info *ring_info,
     {
         ASSERT(ring_info->nmfns == NPAGES_RING(len));
 
-        argo_dprintk("argo: vm%u ring (vm%u:%x vm%u) %p "
+        argo_dprintk("vm%u ring (vm%u:%x vm%u) %p "
                      "mfn_mapping %p len %u nmfns %u\n",
                      d->domain_id, ring_info->id.domain_id,
                      ring_info->id.aport, ring_info->id.partner_id, ring_info,
@@ -1741,7 +1741,7 @@ register_ring(struct domain *currd,
         list_add(&ring_info->node,
                  &currd->argo->ring_hash[hash_index(&ring_info->id)]);
 
-        argo_dprintk("argo: vm%u registering ring (vm%u:%x vm%u)\n",
+        argo_dprintk("vm%u registering ring (vm%u:%x vm%u)\n",
                      currd->domain_id, ring_id.domain_id, ring_id.aport,
                      ring_id.partner_id);
     }
@@ -1781,7 +1781,7 @@ register_ring(struct domain *currd,
             goto out_unlock2;
         }
 
-        argo_dprintk("argo: vm%u re-registering existing ring (vm%u:%x vm%u)\n",
+        argo_dprintk("vm%u re-registering existing ring (vm%u:%x vm%u)\n",
                      currd->domain_id, ring_id.domain_id, ring_id.aport,
                      ring_id.partner_id);
     }
Signature · 1 line
2.54.0
Reviewed-by on v4 3/6
#6 lore raw

Re: [PATCH v4 3/6] argo: drop argo prefix from argo_dprintk() calls

Quoted 8 lines · On 2026-06-03 02:05, [email protected] wrote:

argo_dprintk() prefixes all log lines with "argo: " automatically.

Remove duplicate prefixes from log messages in the Argo module where applicable.

#7 lore raw

PATCH v4 4/6 argo: fixup argo_dprintk()

In reply to [email protected]

Current argo_dprintk() implementation is a wrapper around raw printk().

Rewire it through gprintk() to allow for better debugging context (such as domain ID).

---
Changes since v3:
- n/a

---
 xen/common/argo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/argo.c +1 -1
index ffa1f43437ab..3c38a51d09a2 100644
@@ -322,7 +322,7 @@ static DEFINE_RWLOCK(L1_global_argo_rwlock); /* L1 */
 #define argo_dprintk(fmt, args...)                      \
     do {                                                \
         if ( ARGO_DEBUG )                               \
-            printk(XENLOG_DEBUG "argo: " fmt, ##args);  \
+            gprintk(XENLOG_DEBUG, "argo: " fmt, ##args);\
     } while ( 0 )
 
 /*
Signature · 1 line
2.54.0
#8 lore raw

PATCH v4 5/6 argo: introduce CONFIG_ARGO_DEBUG

In reply to [email protected]

Add Kconfig knob to enable traces for Argo debugging.

---
Changes since v3:
- dropped uneeded "If unsure, say N." from new Kconfig description

---
 xen/common/Kconfig | 5 +++++
 xen/common/argo.c  | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)
xen/common/Kconfig +5 -0
index 5ff71480eebe..17ae01265ced 100644
@@ -491,6 +491,11 @@ config ARGO
 
 	  If unsure, say N.
 
+config ARGO_DEBUG
+	bool "Argo: enable debug traces (UNSUPPORTED)" if ARGO
+	help
+	  Enables extra debug traces for Argo debugging.
+
 source "common/sched/Kconfig"
 
 config CRYPTO
xen/common/argo.c +1 -2
index 3c38a51d09a2..b9b362064e7e 100644
@@ -318,10 +318,9 @@ static DEFINE_RWLOCK(L1_global_argo_rwlock); /* L1 */
     ((LOCKING_Read_L1 && spin_is_locked(&(d)->argo->send_L2_lock)) || \
      LOCKING_Write_L1)
 
-#define ARGO_DEBUG 0
 #define argo_dprintk(fmt, args...)                      \
     do {                                                \
-        if ( ARGO_DEBUG )                               \
+        if ( IS_ENABLED(CONFIG_ARGO_DEBUG) )            \
             gprintk(XENLOG_DEBUG, "argo: " fmt, ##args);\
     } while ( 0 )
 
Signature · 1 line
2.54.0
#9 lore raw

Re: [PATCH v4 5/6] argo: introduce CONFIG_ARGO_DEBUG

xen/common/Kconfig config ARGO · line 495

Quoted 8 lines · On 03.06.2026 08:05, [email protected] wrote:
xen/common/Kconfig +2 -0
@@ -491,6 +491,11 @@ config ARGO
 
 	  If unsure, say N.
 
+config ARGO_DEBUG
+	bool "Argo: enable debug traces (UNSUPPORTED)" if ARGO

I'm sorry, I should have spotted this in v3 already: This wants to be "depends on ARGO". The way you have it you only suppress the prompt, but not the option. Which has certain unwanted (here) effects. Can surely be sorted while committing (once 4.23 is open and once proper ARGO acks have arrived for the series).

Jan

#10 lore raw

Re: [PATCH v4 5/6] argo: introduce CONFIG_ARGO_DEBUG

Quoted 7 lines · Jan Beulich
Quoted 6 lines · On 03.06.2026 08:05, [email protected] wrote:
xen/common/Kconfig +0 -0
@@ -491,6 +491,11 @@ config ARGO
 
 	  If unsure, say N.
 
Quoted 8 lines

xen/common/Kconfig config ARGO · line 495

Quoted 2 lines
xen/common/Kconfig +2 -0
+config ARGO_DEBUG
+	bool "Argo: enable debug traces (UNSUPPORTED)" if ARGO

I'm sorry, I should have spotted this in v3 already: This wants to be "depends on ARGO". The way you have it you only suppress the prompt, but not the option. Which has certain unwanted (here) effects. Can surely be sorted while committing (once 4.23 is open and once proper ARGO acks have arrived for the series).

Thanks for catching this.
Will update and re-send.

--
Denis

#11 lore raw

PATCH v4 6/6 automation: enable Argo debugging in CI

In reply to [email protected]

Enable extra Argo traces in CI to help analyze any potential Argo issues.

That covers eclair-*-allcode and alpine-3.18-gcc-debug jobs.

---
Changes since v3:
- enabled CONFIG_ARGO_DEBUG for eclair-*-allcode jobs
- example of extra argo traces in CI:
https://gitlab.com/xen-project/people/dmukhin/xen/-/jobs/14661834468

---
 automation/gitlab-ci/analyze.yaml | 2 ++
 automation/gitlab-ci/build.yaml   | 1 +
 2 files changed, 3 insertions(+)
automation/gitlab-ci/analyze.yaml +2 -0
index 9bf032931fc4..b5211bcc103d 100644
@@ -47,6 +47,7 @@ eclair-x86_64-allcode:
     RULESET: "monitored"
     EXTRA_XEN_CONFIG: |
       CONFIG_ARGO=y
+      CONFIG_ARGO_DEBUG=y
       CONFIG_DEBUG_LOCK_PROFILE=y
       CONFIG_DEBUG_TRACE=y
       CONFIG_EFI_SET_VIRTUAL_ADDRESS_MAP=y
@@ -126,6 +127,7 @@ eclair-ARM64-allcode:
     EXTRA_XEN_CONFIG: |
       CONFIG_ACPI=y
       CONFIG_ARGO=y
+      CONFIG_ARGO_DEBUG=y
       CONFIG_ARM64_SVE=y
       CONFIG_ARM_SMMU_V3=y
       CONFIG_BOOT_TIME_CPUPOOLS=y
automation/gitlab-ci/build.yaml +1 -0
index 0e5fb26c853e..b864443d0243 100644
@@ -286,6 +286,7 @@ alpine-3.18-gcc-debug:
       CONFIG_EXPERT=y
       CONFIG_UNSUPPORTED=y
       CONFIG_ARGO=y
+      CONFIG_ARGO_DEBUG=y
       CONFIG_UBSAN=y
       CONFIG_UBSAN_FATAL=y
       CONFIG_MICROCODE_SCAN_DEFAULT=y
Signature · 1 line
2.54.0