mbox series

[RFC,0/6] OPAL debugfs calls

Message ID 20200917163544.142593-1-clg@kaod.org
Headers show
Series OPAL debugfs calls | expand

Message

Cédric Le Goater Sept. 17, 2020, 4:35 p.m. UTC
Hello,

These patches add a couple of OPAL read/write calls which let the OPAL
drivers expose any kind of low level information : configuration, HW
registers, statistics. The write call can perform some reconfiguration.

I have been using them for a while on P9 and P10 to query XIVE internals,
time statistics on HW procedures and to modify the allocation of XIVE
resources for guests. It might be useful to others as debug or bringup
extensions. 

Last is the quickly-coded generic Linux driver.

One problem is our snprintf implementation in OPAL which does not
return the number of bytes that would have been written if the buffer
was large enough. It would help the Linux driver.

Thanks,

C. 

Cédric Le Goater (6):
  core: Add debugfs framework
  xive/p9: Add debugfs entries for internal tables
  xive/p9: Add debugfs entries for performance
  core: Add statistics framework
  xive/p9: Add statistics for HW procedures
  xive/p9: Allocate all XIVE structures on a selected chip

 include/opal-api.h     |   4 +-
 include/opal-debug.h   |  26 +++
 include/stat.h         |  49 ++++++
 include/xive-p9-regs.h |  14 ++
 core/opal-debug.c      |  85 +++++++++
 core/stat.c            |  98 +++++++++++
 hw/xive.c              | 390 +++++++++++++++++++++++++++++++++++++++--
 core/Makefile.inc      |   1 +
 8 files changed, 649 insertions(+), 18 deletions(-)
 create mode 100644 include/opal-debug.h
 create mode 100644 include/stat.h
 create mode 100644 core/opal-debug.c
 create mode 100644 core/stat.c