Skip to contentSkip to conversation

argo: few log fixes

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

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 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/2574255630
Link to v4: https://lore.kernel.org/xen-devel/[email protected]/

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                |  6 ++++++
 xen/common/argo.c                 | 22 ++++++++++------------
 4 files changed, 19 insertions(+), 12 deletions(-)
Signature · 1 line
2.54.0
#1 lore raw

PATCH v5 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 v4:
- 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
#2 lore raw

PATCH v5 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 v4:
- 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
#3 lore raw

PATCH v5 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 v4:
- 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
#4 lore raw

PATCH v5 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 v4:
- 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
Reviewed-by on v5 4/6
#5 lore raw

Re: [PATCH v5 4/6] argo: fixup argo_dprintk()

Quoted 7 lines · On 2026-06-03 15:41, [email protected] wrote:

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

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

Quoted 1 line

Changes since v4:

Oops, sorry for replying to the v4 patches. I'm in the correct thread now. All the patches are unchanged, so the R-b stands.

Regards,
Jason

#6 lore raw

Re: [PATCH v5 4/6] argo: fixup argo_dprintk()

Quoted 9 lines · Jason Andryuk
Quoted 7 lines · On 2026-06-03 15:41, [email protected] wrote:

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

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

Quoted 6 lines
Quoted 1 line

Changes since v4:

Oops, sorry for replying to the v4 patches. I'm in the correct thread now. All the patches are unchanged, so the R-b stands.

Thanks for taking a look!

#7 lore raw

PATCH v5 5/6 argo: introduce CONFIG_ARGO_DEBUG

In reply to [email protected]

Add Kconfig knob to enable traces for Argo debugging.

---
Changes since v4:
- fixed dependency on a new Kconfig knob on ARGO

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

---
 xen/common/Kconfig | 6 ++++++
 xen/common/argo.c  | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)
xen/common/Kconfig +6 -0
index 5ff71480eebe..7676a78dca71 100644
@@ -491,6 +491,12 @@ config ARGO
 
 	  If unsure, say N.
 
+config ARGO_DEBUG
+	bool "Argo: enable debug traces (UNSUPPORTED)" if ARGO
+	depends on 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
#8 lore raw

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

Quoted 19 lines · On 03.06.2026 21:41, [email protected] wrote:

Add Kconfig knob to enable traces for Argo debugging.

---
Changes since v4:
- fixed dependency on a new Kconfig knob on ARGO

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

---
 xen/common/Kconfig | 6 ++++++
 xen/common/argo.c  | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)
xen/common/Kconfig +0 -0
index 5ff71480eebe..7676a78dca71 100644

xen/common/Kconfig config ARGO · line 495

Quoted 5 lines
xen/common/Kconfig +2 -0
@@ -491,6 +491,12 @@ config ARGO
 
 	  If unsure, say N.
 
+config ARGO_DEBUG
+	bool "Argo: enable debug traces (UNSUPPORTED)" if ARGO

Why is the "if ARGO" still there? That's fully redundant with ...

xen/common/Kconfig config ARGO · line 496

Quoted 1 line
xen/common/Kconfig +1 -0
+	depends on ARGO

... this. I said the v4 issue could be fixed while committing. Now you've posted another version (adding to overall mail volume) and an adjustment still needs doing.

Jan

Reviewed-by
#9 lore raw

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

Quoted 28 lines · Jan Beulich
Quoted 19 lines · On 03.06.2026 21:41, [email protected] wrote:

Add Kconfig knob to enable traces for Argo debugging.

---
Changes since v4:
- fixed dependency on a new Kconfig knob on ARGO

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

---
  xen/common/Kconfig | 6 ++++++
  xen/common/argo.c  | 3 +--
  2 files changed, 7 insertions(+), 2 deletions(-)
xen/common/Kconfig +0 -0
index 5ff71480eebe..7676a78dca71 100644

xen/common/Kconfig config ARGO · line 495

Quoted 5 lines
xen/common/Kconfig +2 -0
@@ -491,6 +491,12 @@ config ARGO
 
  	  If unsure, say N.
 
+config ARGO_DEBUG
+	bool "Argo: enable debug traces (UNSUPPORTED)" if ARGO

Why is the "if ARGO" still there? That's fully redundant with ...

Quoted 5 lines

xen/common/Kconfig config ARGO · line 496

Quoted 1 line
xen/common/Kconfig +1 -0
+	depends on ARGO

... this. I said the v4 issue could be fixed while committing. Now you've posted another version (adding to overall mail volume) and an adjustment still needs doing.

With the if ARGO removed:

-Jason

#10 lore raw

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

Quoted 33 lines · Jason Andryuk
Quoted 26 lines · Jan Beulich
Quoted 19 lines · On 03.06.2026 21:41, [email protected] wrote:

Add Kconfig knob to enable traces for Argo debugging.

---
Changes since v4:
- fixed dependency on a new Kconfig knob on ARGO

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

---
  xen/common/Kconfig | 6 ++++++
  xen/common/argo.c  | 3 +--
  2 files changed, 7 insertions(+), 2 deletions(-)
xen/common/Kconfig +0 -0
index 5ff71480eebe..7676a78dca71 100644

xen/common/Kconfig config ARGO · line 493

Quoted 3 lines
xen/common/Kconfig +2 -0
@@ -491,6 +491,12 @@ config ARGO
  	  If unsure, say N.
+config ARGO_DEBUG
+	bool "Argo: enable debug traces (UNSUPPORTED)" if ARGO

Why is the "if ARGO" still there? That's fully redundant with ...

Quoted 5 lines

xen/common/Kconfig config ARGO · line 496

Quoted 1 line
xen/common/Kconfig +1 -0
+	depends on ARGO

... this. I said the v4 issue could be fixed while committing. Now you've posted another version (adding to overall mail volume) and an adjustment still needs doing.

Quoted 3 lines

With the if ARGO removed:

Thank you!

#11 lore raw

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

In reply to Jan Beulich
Quoted 28 lines · Jan Beulich
Quoted 19 lines · On 03.06.2026 21:41, [email protected] wrote:

Add Kconfig knob to enable traces for Argo debugging.

---
Changes since v4:
- fixed dependency on a new Kconfig knob on ARGO

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

---
 xen/common/Kconfig | 6 ++++++
 xen/common/argo.c  | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)
xen/common/Kconfig +0 -0
index 5ff71480eebe..7676a78dca71 100644

xen/common/Kconfig config ARGO · line 495

Quoted 5 lines
xen/common/Kconfig +2 -0
@@ -491,6 +491,12 @@ config ARGO
 
 	  If unsure, say N.
 
+config ARGO_DEBUG
+	bool "Argo: enable debug traces (UNSUPPORTED)" if ARGO

Why is the "if ARGO" still there? That's fully redundant with ...

Quoted 5 lines

xen/common/Kconfig config ARGO · line 496

Quoted 1 line
xen/common/Kconfig +1 -0
+	depends on ARGO

... this. I said the v4 issue could be fixed while committing. Now you've posted another version (adding to overall mail volume) and an adjustment still needs doing.

I was not expecting this series to be approved for 4.22, so decided to send an update, supposedly so no adjustments are needed in the future.

Let me fix that.

--
Denis

#12 lore raw

PATCH v5 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 v4:
- n/a
- elcair-x86_64-allcode is green:
https://gitlab.com/xen-project/people/dmukhin/xen/-/jobs/14680426572

Changes since v3:
- enabled CONFIG_ARGO_DEBUG for eclair-*-allcode jobs Note, eclair-x86_64-allcode is failing on staging (known):
https://gitlab.com/xen-project/hardware/xen/-/pipelines/2567857238
- 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 3f7532ee1d25..ae0929d13565 100644
@@ -47,6 +47,7 @@ eclair-x86_64-allcode:
     RULESET: "monitored"
     EXTRA_XEN_CONFIG: |
       CONFIG_ARGO=y
+      CONFIG_ARGO_DEBUG=y
       CONFIG_DEBUG_INFO=n
       CONFIG_DEBUG_LOCK_PROFILE=y
       CONFIG_DEBUG_TRACE=y
@@ -127,6 +128,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
#14 lore raw
In reply to [email protected]
Quoted 22 lines · On 6/3/26 9:41 PM, [email protected] wrote:

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/2574255630
Link to v4: https://lore.kernel.org/xen-devel/[email protected]/

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

Quoted 6 lines
  automation/gitlab-ci/analyze.yaml |  2 ++
  automation/gitlab-ci/build.yaml   |  1 +
  xen/common/Kconfig                |  6 ++++++
  xen/common/argo.c                 | 22 ++++++++++------------
  4 files changed, 19 insertions(+), 12 deletions(-)

Considering that changes affect only the way how ARGO messages are printed I will be comfortable to have this in 4.22 as it is low-risk fixes:

Thasnks.

~ Oleksii