On Thu, 2025-04-10 at 17:09 +0200, Shalini Chellathurai Saroja wrote:
> Add Control-Program Identification data to the QEMU Object
> Model (QOM), along with the timestamp in which the data was received.
> 
> Example:
> virsh # qemu-monitor-command vm --pretty '{
> "execute": "qom-get",
> "arguments": {
> "path": "/machine/sclp/s390-sclp-event-facility/sclpcpi",
> "property": "control-program-id" }}'
> {
>   "return": {
>     "timestamp": 1742390410685762000,
>     "system-level": 74872343805430528,
>     "sysplex-name": "PLEX ",
>     "system-name": "TESTVM  ",
>     "system-type": "LINUX   "
>   },
>   "id": "libvirt-15"
> }
> 
> Signed-off-by: Shalini Chellathurai Saroja <shal...@linux.ibm.com>
> ---
>  hw/s390x/sclpcpi.c                | 39 +++++++++++++++++++++
>  include/hw/s390x/event-facility.h |  9 +++++
>  qapi/machine.json                 | 58 +++++++++++++++++++++++++++++++
>  3 files changed, 106 insertions(+)

[...]

> --- a/include/hw/s390x/event-facility.h
> +++ b/include/hw/s390x/event-facility.h
> @@ -199,9 +199,18 @@ typedef struct SCLPEventCPI SCLPEventCPI;
>  OBJECT_DECLARE_TYPE(SCLPEventCPI, SCLPEventCPIClass,
>                      SCLP_EVENT_CPI)
>  
> +typedef struct ControlProgramId {
> +    uint8_t system_type[8];
> +    uint8_t system_name[8];
> +    uint64_t system_level;
> +    uint8_t sysplex_name[8];
> +    uint64_t timestamp;
> +} ControlProgramId;
> +
>  struct SCLPEventCPI {
>      DeviceState qdev;
>      SCLPEvent event;
> +    ControlProgramId cpi;

Now that this struct exists I would go ahead and inline ControlProgramId.

>  };
>  
>  #define TYPE_SCLP_EVENT_FACILITY "s390-sclp-event-facility"

[...]
-- 
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 
243294

Reply via email to