On 2025-04-30 12:34, Thomas Huth wrote:
On 10/04/2025 17.09, 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.
...
diff --git a/hw/s390x/sclpcpi.c b/hw/s390x/sclpcpi.c
index 13589459b1..dcc8bd3245 100644
--- a/hw/s390x/sclpcpi.c
+++ b/hw/s390x/sclpcpi.c
@@ -18,7 +18,10 @@
*/
#include "qemu/osdep.h"
+#include "qemu/timer.h"
#include "hw/s390x/event-facility.h"
+#include "hw/s390x/ebcdic.h"
+#include "qapi/qapi-visit-machine.h"
typedef struct Data {
uint8_t id_format;
@@ -58,11 +61,39 @@ static int write_event_data(SCLPEvent *event,
EventBufferHeader *evt_buf_hdr)
{
ControlProgramIdMsg *cpim = container_of(evt_buf_hdr,
ControlProgramIdMsg,
ebh);
+ SCLPEventCPI *e = SCLP_EVENT_CPI(event);
+
+ ascii_put(e->cpi.system_type, (char *)cpim->data.system_type, 8);
+ ascii_put(e->cpi.system_name, (char *)cpim->data.system_name, 8);
+ ascii_put(e->cpi.sysplex_name, (char *)cpim->data.sysplex_name,
8);
Would it be possible to use sizeof() instead of hard-coding "8" here?
Hello Thomas,
Yes, it is. I will do so. Thank you very much for the review.
I will also move the property use_cpi to ccw_machine_10_0_class_options,
as version 10.0 is already released.
Thanks,
Thomas
--
Mit freundlichen Grüßen / Kind regards
Shalini Chellathurai Saroja
Software Developer
Linux on IBM Z & KVM Development
IBM Deutschland Research & Development GmbH
Dept 1419, Schoenaicher Str. 220, 71032 Boeblingen
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht
Stuttgart, HRB 243294