CONFIG_DYNAMIC_DEBUG - MarekBykowski/readme GitHub Wiki

What Is Dynamic Debug?

Linux has a feature called CONFIG_DYNAMIC_DEBUG It allows you to turn pr_debug() / dev_dbg() statements on and off at runtime:

  • without rebuilding the kernel.
  • without rebooting.
  • without recompiling with DEBUG.

What That File Is

/sys/kernel/debug/dynamic_debug/control

is a runtime control interface for all dynamic debug callsites in the kernel. It contains entries like:

drivers/pci/doe.c:123 [pci_doe]pci_doe_probe =p

Each line corresponds to a pr_debug() or dev_dbg() in kernel code.

What Your Command Means

file drivers/pci/doe.c +p

Breakdown:

file drivers/pci/doe.c → match all debug statements in that file +p → enable printing

So this command says: Turn on all pr_debug()/dev_dbg() prints inside drivers/pci/doe.c

What Happens After That

If inside drivers/pci/doe.c there is code like:

dev_dbg(dev, "DOE discovered protocol %x\n", proto);

It normally does nothing (silent). After your command it starts printing to:

dmesg

Why This Is Useful For You

You want to see if Linux:

  • Discovers DOE
  • Discovers protocols
  • Attempts SPDM

If QEMU does not advertise protocols, you’ll see debug lines like:

pci_doe: discovering protocols
pci_doe: none found

If SPDM were supported, you'd see:

pci_doe: found SPDM protocol