On 16/06/2025 16.01, Shalini Chellathurai Saroja wrote:
Add Control-Program Identification (CPI) data to the QEMU Object
Model (QOM), along with the timestamp in which the data was received
as shown below.

virsh # qemu-monitor-command vm --pretty '{"execute":"qom-list",
"arguments":{"path":"/machine/sclp/s390-sclp-event-facility/sclpcpi"}}'
{
   "return": [
     [...]
     {
       "name": "system_level",
       "type": "uint64"
     },
     {
       "name": "system_name",
       "type": "string"
     },
     {
       "name": "system_type",
       "type": "string"
     },
     {
       "name": "timestamp",
       "type": "uint64"
     },
     {
       "name": "sysplex_name",
       "type": "string"
     }
   ],
   "id": "libvirt-14"
}

Example CPI data:
virsh # qemu-monitor-command vm --pretty '{"execute":"qom-get",
"arguments":{"path":"/machine/sclp/s390-sclp-event-facility/sclpcpi",
"property":"system_type"}}'
{
   "return": "LINUX   ",
   "id": "libvirt-18"
}
virsh # qemu-monitor-command vm --pretty '{"execute":"qom-get",
"arguments":{"path":"/machine/sclp/s390-sclp-event-facility/sclpcpi",
"property":"system_name"}}'
{
   "return": "TESTVM  ",
   "id": "libvirt-19"
}
virsh # qemu-monitor-command vm --pretty '{"execute":"qom-get",
"arguments":{"path":"/machine/sclp/s390-sclp-event-facility/sclpcpi",
"property":"sysplex_name"}}'
{
   "return": "PLEX    ",
   "id": "libvirt-20"
}
virsh # qemu-monitor-command vm --pretty '{"execute":"qom-get",
"arguments":{"path":"/machine/sclp/s390-sclp-event-facility/sclpcpi",
"property":"system_level"}}'
{
   "return": 74872343805430528,
   "id": "libvirt-21"
}
virsh # qemu-monitor-command vm --pretty '{"execute":"qom-get",
"arguments":{"path":"/machine/sclp/s390-sclp-event-facility/sclpcpi",
"property":"timestamp"}}'
{
   "return": 1748866753433923000,
   "id": "libvirt-22"
}

Signed-off-by: Shalini Chellathurai Saroja <shal...@linux.ibm.com>
---
  hw/s390x/sclpcpi.c                | 74 +++++++++++++++++++++++++++++++
  include/hw/s390x/event-facility.h |  5 +++
  2 files changed, 79 insertions(+)

Reviewed-by: Thomas Huth <th...@redhat.com>


Reply via email to