From 435c758da161448447dc47e678a97b8df434d94c Mon Sep 17 00:00:00 2001 From: Shalini Chellathurai Saroja Date: Mon, 16 Jun 2025 16:01:05 +0200 Subject: hw/s390x: add SCLP event type CPI Implement the Service-Call Logical Processor (SCLP) event type Control-Program Identification (CPI) in QEMU. This event is used to send CPI identifiers from the guest to the host. The CPI identifiers are: system type, system name, system level and sysplex name. System type: operating system of the guest (e.g. "LINUX "). System name: user configurable name of the guest (e.g. "TESTVM "). System level: distribution and kernel version, if the system type is Linux (e.g. 74872343805430528). Sysplex name: name of the cluster which the guest belongs to (if any) (e.g. "PLEX"). The SCLP event CPI is supported only from "s390-ccw-virtio-10.1" machine and higher. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth Message-ID: <20250616140107.990538-2-shalini@linux.ibm.com> Signed-off-by: Thomas Huth --- include/hw/s390x/event-facility.h | 12 ++++++++++++ include/hw/s390x/s390-virtio-ccw.h | 1 + 2 files changed, 13 insertions(+) (limited to 'include') diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-facility.h index ff874e7..e81bc80 100644 --- a/include/hw/s390x/event-facility.h +++ b/include/hw/s390x/event-facility.h @@ -25,6 +25,7 @@ #define SCLP_EVENT_MESSAGE 0x02 #define SCLP_EVENT_CONFIG_MGT_DATA 0x04 #define SCLP_EVENT_PMSGCMD 0x09 +#define SCLP_EVENT_CTRL_PGM_ID 0x0b #define SCLP_EVENT_ASCII_CONSOLE_DATA 0x1a #define SCLP_EVENT_SIGNAL_QUIESCE 0x1d @@ -35,6 +36,7 @@ #define SCLP_EVENT_MASK_MSG SCLP_EVMASK(SCLP_EVENT_MESSAGE) #define SCLP_EVENT_MASK_CONFIG_MGT_DATA SCLP_EVMASK(SCLP_EVENT_CONFIG_MGT_DATA) #define SCLP_EVENT_MASK_PMSGCMD SCLP_EVMASK(SCLP_EVENT_PMSGCMD) +#define SCLP_EVENT_MASK_CTRL_PGM_ID SCLP_EVMASK(SCLP_EVENT_CTRL_PGM_ID) #define SCLP_EVENT_MASK_MSG_ASCII SCLP_EVMASK(SCLP_EVENT_ASCII_CONSOLE_DATA) #define SCLP_EVENT_MASK_SIGNAL_QUIESCE SCLP_EVMASK(SCLP_EVENT_SIGNAL_QUIESCE) @@ -191,6 +193,16 @@ struct SCLPEventClass { bool (*can_handle_event)(uint8_t type); }; +#define TYPE_SCLP_EVENT_CPI "sclpcpi" +typedef struct SCLPEventCPIClass SCLPEventCPIClass; +typedef struct SCLPEventCPI SCLPEventCPI; +OBJECT_DECLARE_TYPE(SCLPEventCPI, SCLPEventCPIClass, + SCLP_EVENT_CPI) + +struct SCLPEventCPI { + SCLPEvent event; +}; + #define TYPE_SCLP_EVENT_FACILITY "s390-sclp-event-facility" typedef struct SCLPEventFacility SCLPEventFacility; typedef struct SCLPEventFacilityClass SCLPEventFacilityClass; diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-virtio-ccw.h index 321b26d..526078a 100644 --- a/include/hw/s390x/s390-virtio-ccw.h +++ b/include/hw/s390x/s390-virtio-ccw.h @@ -54,6 +54,7 @@ struct S390CcwMachineClass { /*< public >*/ int max_threads; + bool use_cpi; }; #endif -- cgit v1.1 From f345978f24becfab4445fbf1ed2519ee9101d1dd Mon Sep 17 00:00:00 2001 From: Shalini Chellathurai Saroja Date: Mon, 16 Jun 2025 16:01:06 +0200 Subject: hw/s390x: add Control-Program Identification to QOM 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 Reviewed-by: Nina Schoetterl-Glausch Message-ID: <20250616140107.990538-3-shalini@linux.ibm.com> Signed-off-by: Thomas Huth --- include/hw/s390x/event-facility.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-facility.h index e81bc80..eac7a51 100644 --- a/include/hw/s390x/event-facility.h +++ b/include/hw/s390x/event-facility.h @@ -201,6 +201,11 @@ OBJECT_DECLARE_TYPE(SCLPEventCPI, SCLPEventCPIClass, struct SCLPEventCPI { SCLPEvent event; + uint8_t system_type[8]; + uint8_t system_name[8]; + uint64_t system_level; + uint8_t sysplex_name[8]; + uint64_t timestamp; }; #define TYPE_SCLP_EVENT_FACILITY "s390-sclp-event-facility" -- cgit v1.1 From 36d7484b0cbd6a6c9e6945d90e4298bec0ff661b Mon Sep 17 00:00:00 2001 From: Sean Wei Date: Fri, 13 Jun 2025 12:43:40 -0400 Subject: include/libdecnumber: replace FSF postal address with licenses URL Some of the GPLv2 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei Reviewed-by: Thomas Huth Message-ID: <20250613.qemu.patch.04@sean.taipei> Signed-off-by: Thomas Huth --- include/libdecnumber/dconfig.h | 5 ++--- include/libdecnumber/decContext.h | 5 ++--- include/libdecnumber/decDPD.h | 5 ++--- include/libdecnumber/decNumber.h | 5 ++--- include/libdecnumber/decNumberLocal.h | 5 ++--- include/libdecnumber/dpd/decimal128.h | 5 ++--- include/libdecnumber/dpd/decimal128Local.h | 5 ++--- include/libdecnumber/dpd/decimal32.h | 5 ++--- include/libdecnumber/dpd/decimal64.h | 5 ++--- 9 files changed, 18 insertions(+), 27 deletions(-) (limited to 'include') diff --git a/include/libdecnumber/dconfig.h b/include/libdecnumber/dconfig.h index 2bc0ba7f..e67ecc1 100644 --- a/include/libdecnumber/dconfig.h +++ b/include/libdecnumber/dconfig.h @@ -23,9 +23,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ #if HOST_BIG_ENDIAN diff --git a/include/libdecnumber/decContext.h b/include/libdecnumber/decContext.h index cea6e42..5bb64e1 100644 --- a/include/libdecnumber/decContext.h +++ b/include/libdecnumber/decContext.h @@ -24,9 +24,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ /* ------------------------------------------------------------------ */ /* Decimal Context module header */ diff --git a/include/libdecnumber/decDPD.h b/include/libdecnumber/decDPD.h index 26a21ec..8eb4552 100644 --- a/include/libdecnumber/decDPD.h +++ b/include/libdecnumber/decDPD.h @@ -24,9 +24,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ /* ------------------------------------------------------------------------ */ /* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */ diff --git a/include/libdecnumber/decNumber.h b/include/libdecnumber/decNumber.h index 41bc2a0..bf37af8 100644 --- a/include/libdecnumber/decNumber.h +++ b/include/libdecnumber/decNumber.h @@ -24,9 +24,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ /* ------------------------------------------------------------------ */ /* Decimal Number arithmetic module header */ diff --git a/include/libdecnumber/decNumberLocal.h b/include/libdecnumber/decNumberLocal.h index 6198ca8..0959f66 100644 --- a/include/libdecnumber/decNumberLocal.h +++ b/include/libdecnumber/decNumberLocal.h @@ -24,9 +24,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ /* ------------------------------------------------------------------ */ /* decNumber package local type, tuning, and macro definitions */ diff --git a/include/libdecnumber/dpd/decimal128.h b/include/libdecnumber/dpd/decimal128.h index aff261e..c57180b 100644 --- a/include/libdecnumber/dpd/decimal128.h +++ b/include/libdecnumber/dpd/decimal128.h @@ -24,9 +24,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ /* ------------------------------------------------------------------ */ /* Decimal 128-bit format module header */ diff --git a/include/libdecnumber/dpd/decimal128Local.h b/include/libdecnumber/dpd/decimal128Local.h index 9765427..2948ab2 100644 --- a/include/libdecnumber/dpd/decimal128Local.h +++ b/include/libdecnumber/dpd/decimal128Local.h @@ -23,9 +23,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ #if !defined(DECIMAL128LOCAL) diff --git a/include/libdecnumber/dpd/decimal32.h b/include/libdecnumber/dpd/decimal32.h index 6cb9e43..9a17933 100644 --- a/include/libdecnumber/dpd/decimal32.h +++ b/include/libdecnumber/dpd/decimal32.h @@ -24,9 +24,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ /* ------------------------------------------------------------------ */ /* Decimal 32-bit format module header */ diff --git a/include/libdecnumber/dpd/decimal64.h b/include/libdecnumber/dpd/decimal64.h index f29e570..5c3d0bb 100644 --- a/include/libdecnumber/dpd/decimal64.h +++ b/include/libdecnumber/dpd/decimal64.h @@ -24,9 +24,8 @@ for more details. You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with GCC; see the file COPYING. If not, see + . */ /* ------------------------------------------------------------------ */ /* Decimal 64-bit format module header */ -- cgit v1.1 From e5308bc52d25da207fbb1cd7b557201b6612fd61 Mon Sep 17 00:00:00 2001 From: Sean Wei Date: Fri, 13 Jun 2025 12:44:10 -0400 Subject: include/hw: replace FSF postal address with licenses URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of the GPLv2 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei Reviewed-by: Cédric Le Goater Message-ID: <20250613.qemu.patch.05@sean.taipei> Signed-off-by: Thomas Huth --- include/hw/i2c/aspeed_i2c.h | 3 +-- include/hw/pci/pci_bridge.h | 4 ++-- include/hw/timer/aspeed_timer.h | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/hw/i2c/aspeed_i2c.h b/include/hw/i2c/aspeed_i2c.h index 2c4c81b..2daacc1 100644 --- a/include/hw/i2c/aspeed_i2c.h +++ b/include/hw/i2c/aspeed_i2c.h @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * with this program; if not, see . */ #ifndef ASPEED_I2C_H diff --git a/include/hw/pci/pci_bridge.h b/include/hw/pci/pci_bridge.h index b0f5204..8cdacbc 100644 --- a/include/hw/pci/pci_bridge.h +++ b/include/hw/pci/pci_bridge.h @@ -14,8 +14,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * along with this program; if not, see + * . * * split out pci bus specific stuff from pci.[hc] to pci_bridge.[hc] * Copyright (c) 2009 Isaku Yamahata diff --git a/include/hw/timer/aspeed_timer.h b/include/hw/timer/aspeed_timer.h index 767cae4..a850625 100644 --- a/include/hw/timer/aspeed_timer.h +++ b/include/hw/timer/aspeed_timer.h @@ -16,8 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * with this program; if not, see . */ #ifndef ASPEED_TIMER_H #define ASPEED_TIMER_H -- cgit v1.1 From c61b807e625846871e3d142a9f101d58f7ee2522 Mon Sep 17 00:00:00 2001 From: Sean Wei Date: Fri, 13 Jun 2025 12:46:15 -0400 Subject: include/qemu: replace FSF postal address with licenses URL The LGPLv2.1 boiler-plate in rcu.h and rcu_queue.h still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei Reviewed-by: Thomas Huth Message-ID: <20250613.qemu.patch.06@sean.taipei> Signed-off-by: Thomas Huth --- include/qemu/rcu.h | 4 ++-- include/qemu/rcu_queue.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index fea058a..020dbe4 100644 --- a/include/qemu/rcu.h +++ b/include/qemu/rcu.h @@ -17,8 +17,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * License along with this library; if not, see + * . * * IBM's contributions to this file may be relicensed under LGPLv2 or later. */ diff --git a/include/qemu/rcu_queue.h b/include/qemu/rcu_queue.h index 4e6298d..bfd5900 100644 --- a/include/qemu/rcu_queue.h +++ b/include/qemu/rcu_queue.h @@ -17,8 +17,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * License along with this library; if not, see + * . * * Copyright (c) 2013 Mike D. Day, IBM Corporation. * -- cgit v1.1