* [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic
@ 2024-05-27 6:27 Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory Thomas Weißschuh
` (7 more replies)
0 siblings, 8 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
Shutdown requests are normally hardware dependent.
By extending pvpanic to also handle shutdown requests, guests can
submit such requests with an easily implementable and cross-platform
mechanism.
The background is the usage of minimal Linux kernels with different
architectures for testing purposes.
Poweroff support varies highly per architecture and requires a bunch of
code to be compiled to work.
pvpanic on the other hand is very small and uniform.
Patch 1 is a fix for scripts/update-linux-headers.sh
Patch 2 updates the bundled linux headers to Linux v6.10-rc1.
Patch 3 and 4 are general cleanups, which seem useful even without this
proposal being implemented.
They should also be ready to be picked up from the series on their own.
The remaining patches implement the new functionality and update the
docs.
The matching driver for Linux is part of Linux v6.10-rc1.
To: Michael S. Tsirkin <mst@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
To: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Cc: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Cc: kvm@vger.kernel.org
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Changes in v8:
- Import linux headers from v6.10-rc1 (and update series subject)
- Use PVPANIC_SHUTDOWN from new linux headers
- Update Since: tag in QAPI to 9.1
- Link to v7: https://lore.kernel.org/r/20240323-pvpanic-shutdown-v7-0-4ac1fd546d6f@t-8ch.de
Changes in v7:
- Keep standard-header/pvpanic.h
- Predefine PVPANIC_SHUTDOWN in include/hw/misc/pvpanic.h
- Fix alignment in QAPI to comply with newly enforced layout
- Update Since: tag in QAPI to 9.0
- Drop note from pvpanic spec about missing implementation
- Link to v6: https://lore.kernel.org/r/20240208-pvpanic-shutdown-v6-0-965580ac057b@t-8ch.de
Changes in v6:
- Replace magic constant "4" in tests with PVPANIC_SHUTDOWN
- Link to v5: https://lore.kernel.org/r/20240129-pvpanic-shutdown-v5-0-f5a060b87c74@t-8ch.de
Changes in v5:
- Add patch from Alejandro to emit a QMP event.
- Update cover letter.
- Add tests.
- Link to v4: https://lore.kernel.org/r/20240107-pvpanic-shutdown-v4-0-81500a7e4081@t-8ch.de
Changes in v4:
- Rebase on 8.2 master
- Resend after tree reopened and holidays
- Link to v3: https://lore.kernel.org/r/20231129-pvpanic-shutdown-v3-0-c9a2892fc523@t-8ch.de
Changes in v3:
- Drop from Linux imported pvpanic header as discussed with Cornelia and
requested by Greg
- Link to v2: https://lore.kernel.org/r/20231128-pvpanic-shutdown-v2-0-830393b45cb6@t-8ch.de
Changes in v2:
- Remove RFC status
- Add Ack from Thomas to 2nd patch
- Fix typo in title of 2nd patch
- Link to v1: https://lore.kernel.org/r/20231104-pvpanic-shutdown-v1-0-02353157891b@t-8ch.de
---
Alejandro Jimenez (1):
pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal
Thomas Weißschuh (7):
scripts/update-linux-headers: Copy setup_data.h to correct directory
linux-headers: update to 6.10-rc1
hw/misc/pvpanic: centralize definition of supported events
tests/qtest/pvpanic: use centralized definition of supported events
hw/misc/pvpanic: add support for normal shutdowns
tests/qtest/pvpanic: add tests for pvshutdown event
Revert "docs/specs/pvpanic: mark shutdown event as not implemented"
docs/specs/pvpanic.rst | 2 +-
hw/misc/pvpanic-isa.c | 3 +-
hw/misc/pvpanic-pci.c | 3 +-
hw/misc/pvpanic.c | 8 +-
include/hw/misc/pvpanic.h | 4 +
include/standard-headers/linux/ethtool.h | 55 +++++++++++
include/standard-headers/linux/pci_regs.h | 6 ++
include/standard-headers/linux/pvpanic.h | 7 +-
include/standard-headers/linux/virtio_bt.h | 1 -
include/standard-headers/linux/virtio_mem.h | 2 +
include/standard-headers/linux/virtio_net.h | 143 ++++++++++++++++++++++++++++
include/sysemu/runstate.h | 1 +
linux-headers/asm-generic/unistd.h | 5 +-
linux-headers/asm-loongarch/kvm.h | 4 +
linux-headers/asm-mips/unistd_n32.h | 1 +
linux-headers/asm-mips/unistd_n64.h | 1 +
linux-headers/asm-mips/unistd_o32.h | 1 +
linux-headers/asm-powerpc/unistd_32.h | 1 +
linux-headers/asm-powerpc/unistd_64.h | 1 +
linux-headers/asm-riscv/kvm.h | 1 +
linux-headers/asm-s390/unistd_32.h | 1 +
linux-headers/asm-s390/unistd_64.h | 1 +
linux-headers/asm-x86/kvm.h | 4 +-
linux-headers/asm-x86/unistd_32.h | 1 +
linux-headers/asm-x86/unistd_64.h | 1 +
linux-headers/asm-x86/unistd_x32.h | 2 +
linux-headers/linux/kvm.h | 4 +-
linux-headers/linux/stddef.h | 8 ++
linux-headers/linux/vhost.h | 15 +--
qapi/run-state.json | 14 +++
scripts/update-linux-headers.sh | 2 +-
system/runstate.c | 6 ++
tests/qtest/pvpanic-pci-test.c | 44 ++++++++-
tests/qtest/pvpanic-test.c | 34 ++++++-
34 files changed, 361 insertions(+), 26 deletions(-)
---
base-commit: 60b54b67c63d8f076152e0f7dccf39854dfc6a77
change-id: 20231104-pvpanic-shutdown-02e4b4cb4949
Best regards,
--
Thomas Weißschuh <thomas@t-8ch.de>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
@ 2024-05-27 6:27 ` Thomas Weißschuh
2024-05-27 6:33 ` Thomas Huth
2024-05-27 6:27 ` [PATCH v8 2/8] linux-headers: update to 6.10-rc1 Thomas Weißschuh
` (6 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
Add the missing "include/" path component, so the files ends up in the
correct place like the other headers.
Fixes: 66210a1a30f2 ("scripts/update-linux-headers: Add setup_data.h to import list")
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index 8963c391895f..a148793bd569 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -158,7 +158,7 @@ for arch in $ARCHLIST; do
cp_portable "$hdrdir/bootparam.h" \
"$output/include/standard-headers/asm-$arch"
cp_portable "$hdrdir/include/asm/setup_data.h" \
- "$output/standard-headers/asm-x86"
+ "$output/include/standard-headers/asm-x86"
fi
if [ $arch = riscv ]; then
cp "$hdrdir/include/asm/ptrace.h" "$output/linux-headers/asm-riscv/"
--
2.45.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v8 2/8] linux-headers: update to 6.10-rc1
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory Thomas Weißschuh
@ 2024-05-27 6:27 ` Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events Thomas Weißschuh
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
include/standard-headers/linux/ethtool.h | 55 +++++++++++
include/standard-headers/linux/pci_regs.h | 6 ++
include/standard-headers/linux/pvpanic.h | 7 +-
include/standard-headers/linux/virtio_bt.h | 1 -
include/standard-headers/linux/virtio_mem.h | 2 +
include/standard-headers/linux/virtio_net.h | 143 ++++++++++++++++++++++++++++
| 5 +-
| 4 +
| 1 +
| 1 +
| 1 +
| 1 +
| 1 +
| 1 +
| 1 +
| 1 +
| 4 +-
| 1 +
| 1 +
| 2 +
| 4 +-
| 8 ++
| 15 +--
23 files changed, 252 insertions(+), 14 deletions(-)
diff --git a/include/standard-headers/linux/ethtool.h b/include/standard-headers/linux/ethtool.h
index 01503784d26f..b0b4b68410f1 100644
--- a/include/standard-headers/linux/ethtool.h
+++ b/include/standard-headers/linux/ethtool.h
@@ -752,6 +752,61 @@ enum ethtool_module_power_mode {
ETHTOOL_MODULE_POWER_MODE_HIGH,
};
+/**
+ * enum ethtool_pse_types - Types of PSE controller.
+ * @ETHTOOL_PSE_UNKNOWN: Type of PSE controller is unknown
+ * @ETHTOOL_PSE_PODL: PSE controller which support PoDL
+ * @ETHTOOL_PSE_C33: PSE controller which support Clause 33 (PoE)
+ */
+enum ethtool_pse_types {
+ ETHTOOL_PSE_UNKNOWN = 1 << 0,
+ ETHTOOL_PSE_PODL = 1 << 1,
+ ETHTOOL_PSE_C33 = 1 << 2,
+};
+
+/**
+ * enum ethtool_c33_pse_admin_state - operational state of the PoDL PSE
+ * functions. IEEE 802.3-2022 30.9.1.1.2 aPSEAdminState
+ * @ETHTOOL_C33_PSE_ADMIN_STATE_UNKNOWN: state of PSE functions is unknown
+ * @ETHTOOL_C33_PSE_ADMIN_STATE_DISABLED: PSE functions are disabled
+ * @ETHTOOL_C33_PSE_ADMIN_STATE_ENABLED: PSE functions are enabled
+ */
+enum ethtool_c33_pse_admin_state {
+ ETHTOOL_C33_PSE_ADMIN_STATE_UNKNOWN = 1,
+ ETHTOOL_C33_PSE_ADMIN_STATE_DISABLED,
+ ETHTOOL_C33_PSE_ADMIN_STATE_ENABLED,
+};
+
+/**
+ * enum ethtool_c33_pse_pw_d_status - power detection status of the PSE.
+ * IEEE 802.3-2022 30.9.1.1.3 aPoDLPSEPowerDetectionStatus:
+ * @ETHTOOL_C33_PSE_PW_D_STATUS_UNKNOWN: PSE status is unknown
+ * @ETHTOOL_C33_PSE_PW_D_STATUS_DISABLED: The enumeration "disabled"
+ * indicates that the PSE State diagram is in the state DISABLED.
+ * @ETHTOOL_C33_PSE_PW_D_STATUS_SEARCHING: The enumeration "searching"
+ * indicates the PSE State diagram is in a state other than those
+ * listed.
+ * @ETHTOOL_C33_PSE_PW_D_STATUS_DELIVERING: The enumeration
+ * "deliveringPower" indicates that the PSE State diagram is in the
+ * state POWER_ON.
+ * @ETHTOOL_C33_PSE_PW_D_STATUS_TEST: The enumeration "test" indicates that
+ * the PSE State diagram is in the state TEST_MODE.
+ * @ETHTOOL_C33_PSE_PW_D_STATUS_FAULT: The enumeration "fault" indicates that
+ * the PSE State diagram is in the state TEST_ERROR.
+ * @ETHTOOL_C33_PSE_PW_D_STATUS_OTHERFAULT: The enumeration "otherFault"
+ * indicates that the PSE State diagram is in the state IDLE due to
+ * the variable error_condition = true.
+ */
+enum ethtool_c33_pse_pw_d_status {
+ ETHTOOL_C33_PSE_PW_D_STATUS_UNKNOWN = 1,
+ ETHTOOL_C33_PSE_PW_D_STATUS_DISABLED,
+ ETHTOOL_C33_PSE_PW_D_STATUS_SEARCHING,
+ ETHTOOL_C33_PSE_PW_D_STATUS_DELIVERING,
+ ETHTOOL_C33_PSE_PW_D_STATUS_TEST,
+ ETHTOOL_C33_PSE_PW_D_STATUS_FAULT,
+ ETHTOOL_C33_PSE_PW_D_STATUS_OTHERFAULT,
+};
+
/**
* enum ethtool_podl_pse_admin_state - operational state of the PoDL PSE
* functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState
diff --git a/include/standard-headers/linux/pci_regs.h b/include/standard-headers/linux/pci_regs.h
index a39193213ff2..94c00996e633 100644
--- a/include/standard-headers/linux/pci_regs.h
+++ b/include/standard-headers/linux/pci_regs.h
@@ -1144,8 +1144,14 @@
#define PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH 0x0003ffff
#define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX 0x000000ff
+#define PCI_DOE_DATA_OBJECT_DISC_REQ_3_VER 0x0000ff00
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID 0x0000ffff
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL 0x00ff0000
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX 0xff000000
+/* Compute Express Link (CXL r3.1, sec 8.1.5) */
+#define PCI_DVSEC_CXL_PORT 3
+#define PCI_DVSEC_CXL_PORT_CTL 0x0c
+#define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x00000001
+
#endif /* LINUX_PCI_REGS_H */
diff --git a/include/standard-headers/linux/pvpanic.h b/include/standard-headers/linux/pvpanic.h
index 54b7485390d3..b1150944316f 100644
--- a/include/standard-headers/linux/pvpanic.h
+++ b/include/standard-headers/linux/pvpanic.h
@@ -3,7 +3,10 @@
#ifndef __PVPANIC_H__
#define __PVPANIC_H__
-#define PVPANIC_PANICKED (1 << 0)
-#define PVPANIC_CRASH_LOADED (1 << 1)
+#include "standard-headers/linux/const.h"
+
+#define PVPANIC_PANICKED _BITUL(0)
+#define PVPANIC_CRASH_LOADED _BITUL(1)
+#define PVPANIC_SHUTDOWN _BITUL(2)
#endif /* __PVPANIC_H__ */
diff --git a/include/standard-headers/linux/virtio_bt.h b/include/standard-headers/linux/virtio_bt.h
index a11ecc3f92df..6f0dee7e326a 100644
--- a/include/standard-headers/linux/virtio_bt.h
+++ b/include/standard-headers/linux/virtio_bt.h
@@ -13,7 +13,6 @@
enum virtio_bt_config_type {
VIRTIO_BT_CONFIG_TYPE_PRIMARY = 0,
- VIRTIO_BT_CONFIG_TYPE_AMP = 1,
};
enum virtio_bt_config_vendor {
diff --git a/include/standard-headers/linux/virtio_mem.h b/include/standard-headers/linux/virtio_mem.h
index 18c74c527c8a..6bfa41bd8b6e 100644
--- a/include/standard-headers/linux/virtio_mem.h
+++ b/include/standard-headers/linux/virtio_mem.h
@@ -90,6 +90,8 @@
#define VIRTIO_MEM_F_ACPI_PXM 0
/* unplugged memory must not be accessed */
#define VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE 1
+/* plugged memory will remain plugged when suspending+resuming */
+#define VIRTIO_MEM_F_PERSISTENT_SUSPEND 2
/* --- virtio-mem: guest -> host requests --- */
diff --git a/include/standard-headers/linux/virtio_net.h b/include/standard-headers/linux/virtio_net.h
index 0f8841774238..fc594fe5fcbe 100644
--- a/include/standard-headers/linux/virtio_net.h
+++ b/include/standard-headers/linux/virtio_net.h
@@ -56,6 +56,7 @@
#define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow
* Steering */
#define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */
+#define VIRTIO_NET_F_DEVICE_STATS 50 /* Device can provide device-level statistics. */
#define VIRTIO_NET_F_VQ_NOTF_COAL 52 /* Device supports virtqueue notification coalescing */
#define VIRTIO_NET_F_NOTF_COAL 53 /* Device supports notifications coalescing */
#define VIRTIO_NET_F_GUEST_USO4 54 /* Guest can handle USOv4 in. */
@@ -406,4 +407,146 @@ struct virtio_net_ctrl_coal_vq {
struct virtio_net_ctrl_coal coal;
};
+/*
+ * Device Statistics
+ */
+#define VIRTIO_NET_CTRL_STATS 8
+#define VIRTIO_NET_CTRL_STATS_QUERY 0
+#define VIRTIO_NET_CTRL_STATS_GET 1
+
+struct virtio_net_stats_capabilities {
+
+#define VIRTIO_NET_STATS_TYPE_CVQ (1ULL << 32)
+
+#define VIRTIO_NET_STATS_TYPE_RX_BASIC (1ULL << 0)
+#define VIRTIO_NET_STATS_TYPE_RX_CSUM (1ULL << 1)
+#define VIRTIO_NET_STATS_TYPE_RX_GSO (1ULL << 2)
+#define VIRTIO_NET_STATS_TYPE_RX_SPEED (1ULL << 3)
+
+#define VIRTIO_NET_STATS_TYPE_TX_BASIC (1ULL << 16)
+#define VIRTIO_NET_STATS_TYPE_TX_CSUM (1ULL << 17)
+#define VIRTIO_NET_STATS_TYPE_TX_GSO (1ULL << 18)
+#define VIRTIO_NET_STATS_TYPE_TX_SPEED (1ULL << 19)
+
+ uint64_t supported_stats_types[1];
+};
+
+struct virtio_net_ctrl_queue_stats {
+ struct {
+ uint16_t vq_index;
+ uint16_t reserved[3];
+ uint64_t types_bitmap[1];
+ } stats[1];
+};
+
+struct virtio_net_stats_reply_hdr {
+#define VIRTIO_NET_STATS_TYPE_REPLY_CVQ 32
+
+#define VIRTIO_NET_STATS_TYPE_REPLY_RX_BASIC 0
+#define VIRTIO_NET_STATS_TYPE_REPLY_RX_CSUM 1
+#define VIRTIO_NET_STATS_TYPE_REPLY_RX_GSO 2
+#define VIRTIO_NET_STATS_TYPE_REPLY_RX_SPEED 3
+
+#define VIRTIO_NET_STATS_TYPE_REPLY_TX_BASIC 16
+#define VIRTIO_NET_STATS_TYPE_REPLY_TX_CSUM 17
+#define VIRTIO_NET_STATS_TYPE_REPLY_TX_GSO 18
+#define VIRTIO_NET_STATS_TYPE_REPLY_TX_SPEED 19
+ uint8_t type;
+ uint8_t reserved;
+ uint16_t vq_index;
+ uint16_t reserved1;
+ uint16_t size;
+};
+
+struct virtio_net_stats_cvq {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ uint64_t command_num;
+ uint64_t ok_num;
+};
+
+struct virtio_net_stats_rx_basic {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ uint64_t rx_notifications;
+
+ uint64_t rx_packets;
+ uint64_t rx_bytes;
+
+ uint64_t rx_interrupts;
+
+ uint64_t rx_drops;
+ uint64_t rx_drop_overruns;
+};
+
+struct virtio_net_stats_tx_basic {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ uint64_t tx_notifications;
+
+ uint64_t tx_packets;
+ uint64_t tx_bytes;
+
+ uint64_t tx_interrupts;
+
+ uint64_t tx_drops;
+ uint64_t tx_drop_malformed;
+};
+
+struct virtio_net_stats_rx_csum {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ uint64_t rx_csum_valid;
+ uint64_t rx_needs_csum;
+ uint64_t rx_csum_none;
+ uint64_t rx_csum_bad;
+};
+
+struct virtio_net_stats_tx_csum {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ uint64_t tx_csum_none;
+ uint64_t tx_needs_csum;
+};
+
+struct virtio_net_stats_rx_gso {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ uint64_t rx_gso_packets;
+ uint64_t rx_gso_bytes;
+ uint64_t rx_gso_packets_coalesced;
+ uint64_t rx_gso_bytes_coalesced;
+};
+
+struct virtio_net_stats_tx_gso {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ uint64_t tx_gso_packets;
+ uint64_t tx_gso_bytes;
+ uint64_t tx_gso_segments;
+ uint64_t tx_gso_segments_bytes;
+ uint64_t tx_gso_packets_noseg;
+ uint64_t tx_gso_bytes_noseg;
+};
+
+struct virtio_net_stats_rx_speed {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ /* rx_{packets,bytes}_allowance_exceeded are too long. So rename to
+ * short name.
+ */
+ uint64_t rx_ratelimit_packets;
+ uint64_t rx_ratelimit_bytes;
+};
+
+struct virtio_net_stats_tx_speed {
+ struct virtio_net_stats_reply_hdr hdr;
+
+ /* tx_{packets,bytes}_allowance_exceeded are too long. So rename to
+ * short name.
+ */
+ uint64_t tx_ratelimit_packets;
+ uint64_t tx_ratelimit_bytes;
+};
+
#endif /* _LINUX_VIRTIO_NET_H */
--git a/linux-headers/asm-generic/unistd.h b/linux-headers/asm-generic/unistd.h
index 75f00965ab15..d983c48a3b6a 100644
--- a/linux-headers/asm-generic/unistd.h
+++ b/linux-headers/asm-generic/unistd.h
@@ -842,8 +842,11 @@ __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr)
#define __NR_lsm_list_modules 461
__SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)
+#define __NR_mseal 462
+__SYSCALL(__NR_mseal, sys_mseal)
+
#undef __NR_syscalls
-#define __NR_syscalls 462
+#define __NR_syscalls 463
/*
* 32 bit systems traditionally used different
--git a/linux-headers/asm-loongarch/kvm.h b/linux-headers/asm-loongarch/kvm.h
index 109785922cf9..f9abef382317 100644
--- a/linux-headers/asm-loongarch/kvm.h
+++ b/linux-headers/asm-loongarch/kvm.h
@@ -17,6 +17,8 @@
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
#define KVM_DIRTY_LOG_PAGE_OFFSET 64
+#define KVM_GUESTDBG_USE_SW_BP 0x00010000
+
/*
* for KVM_GET_REGS and KVM_SET_REGS
*/
@@ -72,6 +74,8 @@ struct kvm_fpu {
#define KVM_REG_LOONGARCH_COUNTER (KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U64 | 1)
#define KVM_REG_LOONGARCH_VCPU_RESET (KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U64 | 2)
+/* Debugging: Special instruction for software breakpoint */
+#define KVM_REG_LOONGARCH_DEBUG_INST (KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U64 | 3)
#define LOONGARCH_REG_SHIFT 3
#define LOONGARCH_REG_64(TYPE, REG) (TYPE | KVM_REG_SIZE_U64 | (REG << LOONGARCH_REG_SHIFT))
--git a/linux-headers/asm-mips/unistd_n32.h b/linux-headers/asm-mips/unistd_n32.h
index ce2e050a9ba4..fc93b3be3091 100644
--- a/linux-headers/asm-mips/unistd_n32.h
+++ b/linux-headers/asm-mips/unistd_n32.h
@@ -390,5 +390,6 @@
#define __NR_lsm_get_self_attr (__NR_Linux + 459)
#define __NR_lsm_set_self_attr (__NR_Linux + 460)
#define __NR_lsm_list_modules (__NR_Linux + 461)
+#define __NR_mseal (__NR_Linux + 462)
#endif /* _ASM_UNISTD_N32_H */
--git a/linux-headers/asm-mips/unistd_n64.h b/linux-headers/asm-mips/unistd_n64.h
index 5bfb3733ffdf..e72a3eb2c937 100644
--- a/linux-headers/asm-mips/unistd_n64.h
+++ b/linux-headers/asm-mips/unistd_n64.h
@@ -366,5 +366,6 @@
#define __NR_lsm_get_self_attr (__NR_Linux + 459)
#define __NR_lsm_set_self_attr (__NR_Linux + 460)
#define __NR_lsm_list_modules (__NR_Linux + 461)
+#define __NR_mseal (__NR_Linux + 462)
#endif /* _ASM_UNISTD_N64_H */
--git a/linux-headers/asm-mips/unistd_o32.h b/linux-headers/asm-mips/unistd_o32.h
index 02eaecd020ec..b86eb0786c76 100644
--- a/linux-headers/asm-mips/unistd_o32.h
+++ b/linux-headers/asm-mips/unistd_o32.h
@@ -436,5 +436,6 @@
#define __NR_lsm_get_self_attr (__NR_Linux + 459)
#define __NR_lsm_set_self_attr (__NR_Linux + 460)
#define __NR_lsm_list_modules (__NR_Linux + 461)
+#define __NR_mseal (__NR_Linux + 462)
#endif /* _ASM_UNISTD_O32_H */
--git a/linux-headers/asm-powerpc/unistd_32.h b/linux-headers/asm-powerpc/unistd_32.h
index bbab08d6ec26..28627b6546f2 100644
--- a/linux-headers/asm-powerpc/unistd_32.h
+++ b/linux-headers/asm-powerpc/unistd_32.h
@@ -443,6 +443,7 @@
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
+#define __NR_mseal 462
#endif /* _ASM_UNISTD_32_H */
--git a/linux-headers/asm-powerpc/unistd_64.h b/linux-headers/asm-powerpc/unistd_64.h
index af34cde70f20..1fc42a830046 100644
--- a/linux-headers/asm-powerpc/unistd_64.h
+++ b/linux-headers/asm-powerpc/unistd_64.h
@@ -415,6 +415,7 @@
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
+#define __NR_mseal 462
#endif /* _ASM_UNISTD_64_H */
--git a/linux-headers/asm-riscv/kvm.h b/linux-headers/asm-riscv/kvm.h
index b1c503c2959c..e878e7cc3978 100644
--- a/linux-headers/asm-riscv/kvm.h
+++ b/linux-headers/asm-riscv/kvm.h
@@ -167,6 +167,7 @@ enum KVM_RISCV_ISA_EXT_ID {
KVM_RISCV_ISA_EXT_ZFA,
KVM_RISCV_ISA_EXT_ZTSO,
KVM_RISCV_ISA_EXT_ZACAS,
+ KVM_RISCV_ISA_EXT_SSCOFPMF,
KVM_RISCV_ISA_EXT_MAX,
};
--git a/linux-headers/asm-s390/unistd_32.h b/linux-headers/asm-s390/unistd_32.h
index a3ece69d8241..7706c21b87e2 100644
--- a/linux-headers/asm-s390/unistd_32.h
+++ b/linux-headers/asm-s390/unistd_32.h
@@ -434,5 +434,6 @@
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
+#define __NR_mseal 462
#endif /* _ASM_S390_UNISTD_32_H */
--git a/linux-headers/asm-s390/unistd_64.h b/linux-headers/asm-s390/unistd_64.h
index 8c5fd93495ce..62082d592d35 100644
--- a/linux-headers/asm-s390/unistd_64.h
+++ b/linux-headers/asm-s390/unistd_64.h
@@ -382,5 +382,6 @@
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
+#define __NR_mseal 462
#endif /* _ASM_S390_UNISTD_64_H */
--git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index 31c95c2dfe4c..b4e2e8d220e2 100644
--- a/linux-headers/asm-x86/kvm.h
+++ b/linux-headers/asm-x86/kvm.h
@@ -709,7 +709,9 @@ struct kvm_sev_cmd {
struct kvm_sev_init {
__u64 vmsa_features;
__u32 flags;
- __u32 pad[9];
+ __u16 ghcb_version;
+ __u16 pad1;
+ __u32 pad2[8];
};
struct kvm_sev_launch_start {
--git a/linux-headers/asm-x86/unistd_32.h b/linux-headers/asm-x86/unistd_32.h
index 5c9c329e9390..fb7b8b169bfa 100644
--- a/linux-headers/asm-x86/unistd_32.h
+++ b/linux-headers/asm-x86/unistd_32.h
@@ -452,6 +452,7 @@
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
+#define __NR_mseal 462
#endif /* _ASM_UNISTD_32_H */
--git a/linux-headers/asm-x86/unistd_64.h b/linux-headers/asm-x86/unistd_64.h
index d9aab7ae87d8..da439afee1cf 100644
--- a/linux-headers/asm-x86/unistd_64.h
+++ b/linux-headers/asm-x86/unistd_64.h
@@ -374,6 +374,7 @@
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
+#define __NR_mseal 462
#endif /* _ASM_UNISTD_64_H */
--git a/linux-headers/asm-x86/unistd_x32.h b/linux-headers/asm-x86/unistd_x32.h
index 63cdd1ee43df..4fcb607c724b 100644
--- a/linux-headers/asm-x86/unistd_x32.h
+++ b/linux-headers/asm-x86/unistd_x32.h
@@ -318,6 +318,7 @@
#define __NR_set_mempolicy_home_node (__X32_SYSCALL_BIT + 450)
#define __NR_cachestat (__X32_SYSCALL_BIT + 451)
#define __NR_fchmodat2 (__X32_SYSCALL_BIT + 452)
+#define __NR_map_shadow_stack (__X32_SYSCALL_BIT + 453)
#define __NR_futex_wake (__X32_SYSCALL_BIT + 454)
#define __NR_futex_wait (__X32_SYSCALL_BIT + 455)
#define __NR_futex_requeue (__X32_SYSCALL_BIT + 456)
@@ -326,6 +327,7 @@
#define __NR_lsm_get_self_attr (__X32_SYSCALL_BIT + 459)
#define __NR_lsm_set_self_attr (__X32_SYSCALL_BIT + 460)
#define __NR_lsm_list_modules (__X32_SYSCALL_BIT + 461)
+#define __NR_mseal (__X32_SYSCALL_BIT + 462)
#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
--git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 038731cdef26..c93876ca0ba9 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -1217,9 +1217,9 @@ struct kvm_vfio_spapr_tce {
/* Available with KVM_CAP_SPAPR_RESIZE_HPT */
#define KVM_PPC_RESIZE_HPT_PREPARE _IOR(KVMIO, 0xad, struct kvm_ppc_resize_hpt)
#define KVM_PPC_RESIZE_HPT_COMMIT _IOR(KVMIO, 0xae, struct kvm_ppc_resize_hpt)
-/* Available with KVM_CAP_PPC_RADIX_MMU or KVM_CAP_PPC_HASH_MMU_V3 */
+/* Available with KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3 */
#define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg)
-/* Available with KVM_CAP_PPC_RADIX_MMU */
+/* Available with KVM_CAP_PPC_MMU_RADIX */
#define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info)
/* Available with KVM_CAP_PPC_GET_CPU_CHAR */
#define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char)
--git a/linux-headers/linux/stddef.h b/linux-headers/linux/stddef.h
index bf9749dd1422..96aa341942b0 100644
--- a/linux-headers/linux/stddef.h
+++ b/linux-headers/linux/stddef.h
@@ -55,4 +55,12 @@
#define __counted_by(m)
#endif
+#ifndef __counted_by_le
+#define __counted_by_le(m)
+#endif
+
+#ifndef __counted_by_be
+#define __counted_by_be(m)
+#endif
+
#endif /* _LINUX_STDDEF_H */
--git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index bea697390613..b95dd84eef2d 100644
--- a/linux-headers/linux/vhost.h
+++ b/linux-headers/linux/vhost.h
@@ -179,12 +179,6 @@
/* Get the config size */
#define VHOST_VDPA_GET_CONFIG_SIZE _IOR(VHOST_VIRTIO, 0x79, __u32)
-/* Get the count of all virtqueues */
-#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32)
-
-/* Get the number of virtqueue groups. */
-#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32)
-
/* Get the number of address spaces. */
#define VHOST_VDPA_GET_AS_NUM _IOR(VHOST_VIRTIO, 0x7A, unsigned int)
@@ -228,10 +222,17 @@
#define VHOST_VDPA_GET_VRING_DESC_GROUP _IOWR(VHOST_VIRTIO, 0x7F, \
struct vhost_vring_state)
+
+/* Get the count of all virtqueues */
+#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32)
+
+/* Get the number of virtqueue groups. */
+#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32)
+
/* Get the queue size of a specific virtqueue.
* userspace set the vring index in vhost_vring_state.index
* kernel set the queue size in vhost_vring_state.num
*/
-#define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x80, \
+#define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x82, \
struct vhost_vring_state)
#endif
--
2.45.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 2/8] linux-headers: update to 6.10-rc1 Thomas Weißschuh
@ 2024-05-27 6:27 ` Thomas Weißschuh
2024-06-21 10:26 ` Michael S. Tsirkin
2024-05-27 6:27 ` [PATCH v8 4/8] tests/qtest/pvpanic: use centralized " Thomas Weißschuh
` (4 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
The different components of pvpanic duplicate the list of supported
events. Move it to the shared header file to minimize changes when new
events are added.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
hw/misc/pvpanic-isa.c | 3 +--
hw/misc/pvpanic-pci.c | 3 +--
hw/misc/pvpanic.c | 3 +--
include/hw/misc/pvpanic.h | 4 ++++
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/hw/misc/pvpanic-isa.c b/hw/misc/pvpanic-isa.c
index ccec50f61bbd..9a923b786907 100644
--- a/hw/misc/pvpanic-isa.c
+++ b/hw/misc/pvpanic-isa.c
@@ -21,7 +21,6 @@
#include "hw/misc/pvpanic.h"
#include "qom/object.h"
#include "hw/isa/isa.h"
-#include "standard-headers/linux/pvpanic.h"
#include "hw/acpi/acpi_aml_interface.h"
OBJECT_DECLARE_SIMPLE_TYPE(PVPanicISAState, PVPANIC_ISA_DEVICE)
@@ -102,7 +101,7 @@ static void build_pvpanic_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
static Property pvpanic_isa_properties[] = {
DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicISAState, ioport, 0x505),
DEFINE_PROP_UINT8("events", PVPanicISAState, pvpanic.events,
- PVPANIC_PANICKED | PVPANIC_CRASH_LOADED),
+ PVPANIC_EVENTS),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/pvpanic-pci.c b/hw/misc/pvpanic-pci.c
index 83be95d0d249..603c5c7600da 100644
--- a/hw/misc/pvpanic-pci.c
+++ b/hw/misc/pvpanic-pci.c
@@ -21,7 +21,6 @@
#include "hw/misc/pvpanic.h"
#include "qom/object.h"
#include "hw/pci/pci_device.h"
-#include "standard-headers/linux/pvpanic.h"
OBJECT_DECLARE_SIMPLE_TYPE(PVPanicPCIState, PVPANIC_PCI_DEVICE)
@@ -55,7 +54,7 @@ static void pvpanic_pci_realizefn(PCIDevice *dev, Error **errp)
static Property pvpanic_pci_properties[] = {
DEFINE_PROP_UINT8("events", PVPanicPCIState, pvpanic.events,
- PVPANIC_PANICKED | PVPANIC_CRASH_LOADED),
+ PVPANIC_EVENTS),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index 1540e9091a45..a4982cc5928e 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -21,13 +21,12 @@
#include "hw/qdev-properties.h"
#include "hw/misc/pvpanic.h"
#include "qom/object.h"
-#include "standard-headers/linux/pvpanic.h"
static void handle_event(int event)
{
static bool logged;
- if (event & ~(PVPANIC_PANICKED | PVPANIC_CRASH_LOADED) && !logged) {
+ if (event & ~PVPANIC_EVENTS && !logged) {
qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown event %#x.\n", event);
logged = true;
}
diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h
index fab94165d03d..947468b81b1a 100644
--- a/include/hw/misc/pvpanic.h
+++ b/include/hw/misc/pvpanic.h
@@ -18,6 +18,10 @@
#include "exec/memory.h"
#include "qom/object.h"
+#include "standard-headers/linux/pvpanic.h"
+
+#define PVPANIC_EVENTS (PVPANIC_PANICKED | PVPANIC_CRASH_LOADED)
+
#define TYPE_PVPANIC_ISA_DEVICE "pvpanic"
#define TYPE_PVPANIC_PCI_DEVICE "pvpanic-pci"
--
2.45.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v8 4/8] tests/qtest/pvpanic: use centralized definition of supported events
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
` (2 preceding siblings ...)
2024-05-27 6:27 ` [PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events Thomas Weißschuh
@ 2024-05-27 6:27 ` Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 5/8] hw/misc/pvpanic: add support for normal shutdowns Thomas Weißschuh
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
Avoid the necessity to update all tests when new events are added
to the device.
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
tests/qtest/pvpanic-pci-test.c | 5 +++--
tests/qtest/pvpanic-test.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/qtest/pvpanic-pci-test.c b/tests/qtest/pvpanic-pci-test.c
index 2c05b376ba72..b372caf41dc0 100644
--- a/tests/qtest/pvpanic-pci-test.c
+++ b/tests/qtest/pvpanic-pci-test.c
@@ -16,6 +16,7 @@
#include "qapi/qmp/qdict.h"
#include "libqos/pci.h"
#include "libqos/pci-pc.h"
+#include "hw/misc/pvpanic.h"
#include "hw/pci/pci_regs.h"
static void test_panic_nopause(void)
@@ -34,7 +35,7 @@ static void test_panic_nopause(void)
bar = qpci_iomap(dev, 0, NULL);
qpci_memread(dev, bar, 0, &val, sizeof(val));
- g_assert_cmpuint(val, ==, 3);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
val = 1;
qpci_memwrite(dev, bar, 0, &val, sizeof(val));
@@ -67,7 +68,7 @@ static void test_panic(void)
bar = qpci_iomap(dev, 0, NULL);
qpci_memread(dev, bar, 0, &val, sizeof(val));
- g_assert_cmpuint(val, ==, 3);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
val = 1;
qpci_memwrite(dev, bar, 0, &val, sizeof(val));
diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c
index 78f1cf8186b0..ccc603472f5d 100644
--- a/tests/qtest/pvpanic-test.c
+++ b/tests/qtest/pvpanic-test.c
@@ -10,6 +10,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qapi/qmp/qdict.h"
+#include "hw/misc/pvpanic.h"
static void test_panic_nopause(void)
{
@@ -20,7 +21,7 @@ static void test_panic_nopause(void)
qts = qtest_init("-device pvpanic -action panic=none");
val = qtest_inb(qts, 0x505);
- g_assert_cmpuint(val, ==, 3);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
qtest_outb(qts, 0x505, 0x1);
@@ -43,7 +44,7 @@ static void test_panic(void)
qts = qtest_init("-device pvpanic -action panic=pause");
val = qtest_inb(qts, 0x505);
- g_assert_cmpuint(val, ==, 3);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
qtest_outb(qts, 0x505, 0x1);
--
2.45.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v8 5/8] hw/misc/pvpanic: add support for normal shutdowns
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
` (3 preceding siblings ...)
2024-05-27 6:27 ` [PATCH v8 4/8] tests/qtest/pvpanic: use centralized " Thomas Weißschuh
@ 2024-05-27 6:27 ` Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 6/8] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal Thomas Weißschuh
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
Shutdown requests are normally hardware dependent.
By extending pvpanic to also handle shutdown requests, guests can
submit such requests with an easily implementable and cross-platform
mechanism.
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
hw/misc/pvpanic.c | 5 +++++
include/hw/misc/pvpanic.h | 2 +-
include/sysemu/runstate.h | 1 +
system/runstate.c | 5 +++++
4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index a4982cc5928e..0e9505451a7a 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -40,6 +40,11 @@ static void handle_event(int event)
qemu_system_guest_crashloaded(NULL);
return;
}
+
+ if (event & PVPANIC_SHUTDOWN) {
+ qemu_system_guest_pvshutdown();
+ return;
+ }
}
/* return supported events on read */
diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h
index 947468b81b1a..fbbf2bbf5dbb 100644
--- a/include/hw/misc/pvpanic.h
+++ b/include/hw/misc/pvpanic.h
@@ -20,7 +20,7 @@
#include "standard-headers/linux/pvpanic.h"
-#define PVPANIC_EVENTS (PVPANIC_PANICKED | PVPANIC_CRASH_LOADED)
+#define PVPANIC_EVENTS (PVPANIC_PANICKED | PVPANIC_CRASH_LOADED | PVPANIC_SHUTDOWN)
#define TYPE_PVPANIC_ISA_DEVICE "pvpanic"
#define TYPE_PVPANIC_PCI_DEVICE "pvpanic-pci"
diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h
index 0117d243c4ed..e210a37abf0f 100644
--- a/include/sysemu/runstate.h
+++ b/include/sysemu/runstate.h
@@ -104,6 +104,7 @@ void qemu_system_killed(int signal, pid_t pid);
void qemu_system_reset(ShutdownCause reason);
void qemu_system_guest_panicked(GuestPanicInformation *info);
void qemu_system_guest_crashloaded(GuestPanicInformation *info);
+void qemu_system_guest_pvshutdown(void);
bool qemu_system_dump_in_progress(void);
#endif
diff --git a/system/runstate.c b/system/runstate.c
index cb4905a40fce..83055f327831 100644
--- a/system/runstate.c
+++ b/system/runstate.c
@@ -585,6 +585,11 @@ void qemu_system_guest_crashloaded(GuestPanicInformation *info)
qapi_free_GuestPanicInformation(info);
}
+void qemu_system_guest_pvshutdown(void)
+{
+ qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
+}
+
void qemu_system_reset_request(ShutdownCause reason)
{
if (reboot_action == REBOOT_ACTION_SHUTDOWN &&
--
2.45.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v8 6/8] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
` (4 preceding siblings ...)
2024-05-27 6:27 ` [PATCH v8 5/8] hw/misc/pvpanic: add support for normal shutdowns Thomas Weißschuh
@ 2024-05-27 6:27 ` Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 7/8] tests/qtest/pvpanic: add tests for pvshutdown event Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 8/8] Revert "docs/specs/pvpanic: mark shutdown event as not implemented" Thomas Weißschuh
7 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
From: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typical
SHUTDOWN event will be sent, it will be indistinguishable from a shutdown
originating from other cases (e.g. KVM exit due to KVM_SYSTEM_EVENT_SHUTDOWN)
that also issue the guest-shutdown cause.
A management layer application can detect the new GUEST_PVSHUTDOWN event to
determine if the guest is using the pvpanic interface to request shutdowns.
Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
---
qapi/run-state.json | 14 ++++++++++++++
system/runstate.c | 1 +
2 files changed, 15 insertions(+)
diff --git a/qapi/run-state.json b/qapi/run-state.json
index f8773f23b298..5ac0fec85236 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -462,6 +462,20 @@
{ 'event': 'GUEST_CRASHLOADED',
'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
+##
+# @GUEST_PVSHUTDOWN:
+#
+# Emitted when guest submits a shutdown request via pvpanic interface
+#
+# Since: 9.1
+#
+# Example:
+#
+# <- { "event": "GUEST_PVSHUTDOWN",
+# "timestamp": { "seconds": 1648245259, "microseconds": 893771 } }
+##
+{ 'event': 'GUEST_PVSHUTDOWN' }
+
##
# @GuestPanicAction:
#
diff --git a/system/runstate.c b/system/runstate.c
index 83055f327831..c149b1ab4ba6 100644
--- a/system/runstate.c
+++ b/system/runstate.c
@@ -587,6 +587,7 @@ void qemu_system_guest_crashloaded(GuestPanicInformation *info)
void qemu_system_guest_pvshutdown(void)
{
+ qapi_event_send_guest_pvshutdown();
qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
}
--
2.45.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v8 7/8] tests/qtest/pvpanic: add tests for pvshutdown event
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
` (5 preceding siblings ...)
2024-05-27 6:27 ` [PATCH v8 6/8] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal Thomas Weißschuh
@ 2024-05-27 6:27 ` Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 8/8] Revert "docs/specs/pvpanic: mark shutdown event as not implemented" Thomas Weißschuh
7 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
Validate that a shutdown via the pvpanic device emits the correct
QMP events.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/pvpanic-pci-test.c | 39 +++++++++++++++++++++++++++++++++++++++
tests/qtest/pvpanic-test.c | 29 +++++++++++++++++++++++++++++
2 files changed, 68 insertions(+)
diff --git a/tests/qtest/pvpanic-pci-test.c b/tests/qtest/pvpanic-pci-test.c
index b372caf41dc0..dc021c2fdf77 100644
--- a/tests/qtest/pvpanic-pci-test.c
+++ b/tests/qtest/pvpanic-pci-test.c
@@ -85,11 +85,50 @@ static void test_panic(void)
qtest_quit(qts);
}
+static void test_pvshutdown(void)
+{
+ uint8_t val;
+ QDict *response, *data;
+ QTestState *qts;
+ QPCIBus *pcibus;
+ QPCIDevice *dev;
+ QPCIBar bar;
+
+ qts = qtest_init("-device pvpanic-pci,addr=04.0");
+ pcibus = qpci_new_pc(qts, NULL);
+ dev = qpci_device_find(pcibus, QPCI_DEVFN(0x4, 0x0));
+ qpci_device_enable(dev);
+ bar = qpci_iomap(dev, 0, NULL);
+
+ qpci_memread(dev, bar, 0, &val, sizeof(val));
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
+
+ val = PVPANIC_SHUTDOWN;
+ qpci_memwrite(dev, bar, 0, &val, sizeof(val));
+
+ response = qtest_qmp_eventwait_ref(qts, "GUEST_PVSHUTDOWN");
+ qobject_unref(response);
+
+ response = qtest_qmp_eventwait_ref(qts, "SHUTDOWN");
+ g_assert(qdict_haskey(response, "data"));
+ data = qdict_get_qdict(response, "data");
+ g_assert(qdict_haskey(data, "guest"));
+ g_assert(qdict_get_bool(data, "guest"));
+ g_assert(qdict_haskey(data, "reason"));
+ g_assert_cmpstr(qdict_get_str(data, "reason"), ==, "guest-shutdown");
+ qobject_unref(response);
+
+ g_free(dev);
+ qpci_free_pc(pcibus);
+ qtest_quit(qts);
+}
+
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
qtest_add_func("/pvpanic-pci/panic", test_panic);
qtest_add_func("/pvpanic-pci/panic-nopause", test_panic_nopause);
+ qtest_add_func("/pvpanic-pci/pvshutdown", test_pvshutdown);
return g_test_run();
}
diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c
index ccc603472f5d..d49d2ba9313e 100644
--- a/tests/qtest/pvpanic-test.c
+++ b/tests/qtest/pvpanic-test.c
@@ -58,11 +58,40 @@ static void test_panic(void)
qtest_quit(qts);
}
+static void test_pvshutdown(void)
+{
+ uint8_t val;
+ QDict *response, *data;
+ QTestState *qts;
+
+ qts = qtest_init("-device pvpanic");
+
+ val = qtest_inb(qts, 0x505);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
+
+ qtest_outb(qts, 0x505, PVPANIC_SHUTDOWN);
+
+ response = qtest_qmp_eventwait_ref(qts, "GUEST_PVSHUTDOWN");
+ qobject_unref(response);
+
+ response = qtest_qmp_eventwait_ref(qts, "SHUTDOWN");
+ g_assert(qdict_haskey(response, "data"));
+ data = qdict_get_qdict(response, "data");
+ g_assert(qdict_haskey(data, "guest"));
+ g_assert(qdict_get_bool(data, "guest"));
+ g_assert(qdict_haskey(data, "reason"));
+ g_assert_cmpstr(qdict_get_str(data, "reason"), ==, "guest-shutdown");
+ qobject_unref(response);
+
+ qtest_quit(qts);
+}
+
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
qtest_add_func("/pvpanic/panic", test_panic);
qtest_add_func("/pvpanic/panic-nopause", test_panic_nopause);
+ qtest_add_func("/pvpanic/pvshutdown", test_pvshutdown);
return g_test_run();
}
--
2.45.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v8 8/8] Revert "docs/specs/pvpanic: mark shutdown event as not implemented"
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
` (6 preceding siblings ...)
2024-05-27 6:27 ` [PATCH v8 7/8] tests/qtest/pvpanic: add tests for pvshutdown event Thomas Weißschuh
@ 2024-05-27 6:27 ` Thomas Weißschuh
7 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2024-05-27 6:27 UTC (permalink / raw)
To: Michael S. Tsirkin, Cornelia Huck, Paolo Bonzini, Thomas Huth,
Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm, Thomas Weißschuh
The missing functionality has been implemented now.
This reverts commit e739d1935c461d0668057e9dbba9d06f728d29ec.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
docs/specs/pvpanic.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/specs/pvpanic.rst b/docs/specs/pvpanic.rst
index b0f27860ec3b..61a80480edb8 100644
--- a/docs/specs/pvpanic.rst
+++ b/docs/specs/pvpanic.rst
@@ -29,7 +29,7 @@ bit 1
a guest panic has happened and will be handled by the guest;
the host should record it or report it, but should not affect
the execution of the guest.
-bit 2 (to be implemented)
+bit 2
a regular guest shutdown has happened and should be processed by the host
PCI Interface
--
2.45.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory
2024-05-27 6:27 ` [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory Thomas Weißschuh
@ 2024-05-27 6:33 ` Thomas Huth
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Huth @ 2024-05-27 6:33 UTC (permalink / raw)
To: Thomas Weißschuh, Michael S. Tsirkin, Cornelia Huck,
Paolo Bonzini, Laurent Vivier, Eric Blake, Markus Armbruster
Cc: qemu-devel, Alejandro Jimenez, kvm
On 27/05/2024 08.27, Thomas Weißschuh wrote:
> Add the missing "include/" path component, so the files ends up in the
> correct place like the other headers.
>
> Fixes: 66210a1a30f2 ("scripts/update-linux-headers: Add setup_data.h to import list")
> Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
> ---
> scripts/update-linux-headers.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
> index 8963c391895f..a148793bd569 100755
> --- a/scripts/update-linux-headers.sh
> +++ b/scripts/update-linux-headers.sh
> @@ -158,7 +158,7 @@ for arch in $ARCHLIST; do
> cp_portable "$hdrdir/bootparam.h" \
> "$output/include/standard-headers/asm-$arch"
> cp_portable "$hdrdir/include/asm/setup_data.h" \
> - "$output/standard-headers/asm-x86"
> + "$output/include/standard-headers/asm-x86"
I just ran into the same issue!
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events
2024-05-27 6:27 ` [PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events Thomas Weißschuh
@ 2024-06-21 10:26 ` Michael S. Tsirkin
2024-06-21 10:45 ` Thomas Weißschuh
0 siblings, 1 reply; 12+ messages in thread
From: Michael S. Tsirkin @ 2024-06-21 10:26 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Cornelia Huck, Paolo Bonzini, Thomas Huth, Laurent Vivier,
Eric Blake, Markus Armbruster, qemu-devel, Alejandro Jimenez, kvm
On Mon, May 27, 2024 at 08:27:49AM +0200, Thomas Weißschuh wrote:
> The different components of pvpanic duplicate the list of supported
> events. Move it to the shared header file to minimize changes when new
> events are added.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
> Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
> ---
> hw/misc/pvpanic-isa.c | 3 +--
> hw/misc/pvpanic-pci.c | 3 +--
> hw/misc/pvpanic.c | 3 +--
> include/hw/misc/pvpanic.h | 4 ++++
> 4 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/hw/misc/pvpanic-isa.c b/hw/misc/pvpanic-isa.c
> index ccec50f61bbd..9a923b786907 100644
> --- a/hw/misc/pvpanic-isa.c
> +++ b/hw/misc/pvpanic-isa.c
> @@ -21,7 +21,6 @@
> #include "hw/misc/pvpanic.h"
> #include "qom/object.h"
> #include "hw/isa/isa.h"
> -#include "standard-headers/linux/pvpanic.h"
> #include "hw/acpi/acpi_aml_interface.h"
>
> OBJECT_DECLARE_SIMPLE_TYPE(PVPanicISAState, PVPANIC_ISA_DEVICE)
> @@ -102,7 +101,7 @@ static void build_pvpanic_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
> static Property pvpanic_isa_properties[] = {
> DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicISAState, ioport, 0x505),
> DEFINE_PROP_UINT8("events", PVPanicISAState, pvpanic.events,
> - PVPANIC_PANICKED | PVPANIC_CRASH_LOADED),
> + PVPANIC_EVENTS),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> diff --git a/hw/misc/pvpanic-pci.c b/hw/misc/pvpanic-pci.c
> index 83be95d0d249..603c5c7600da 100644
> --- a/hw/misc/pvpanic-pci.c
> +++ b/hw/misc/pvpanic-pci.c
> @@ -21,7 +21,6 @@
> #include "hw/misc/pvpanic.h"
> #include "qom/object.h"
> #include "hw/pci/pci_device.h"
> -#include "standard-headers/linux/pvpanic.h"
>
> OBJECT_DECLARE_SIMPLE_TYPE(PVPanicPCIState, PVPANIC_PCI_DEVICE)
>
> @@ -55,7 +54,7 @@ static void pvpanic_pci_realizefn(PCIDevice *dev, Error **errp)
>
> static Property pvpanic_pci_properties[] = {
> DEFINE_PROP_UINT8("events", PVPanicPCIState, pvpanic.events,
> - PVPANIC_PANICKED | PVPANIC_CRASH_LOADED),
> + PVPANIC_EVENTS),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
> index 1540e9091a45..a4982cc5928e 100644
> --- a/hw/misc/pvpanic.c
> +++ b/hw/misc/pvpanic.c
> @@ -21,13 +21,12 @@
> #include "hw/qdev-properties.h"
> #include "hw/misc/pvpanic.h"
> #include "qom/object.h"
> -#include "standard-headers/linux/pvpanic.h"
This part is wrong. PVPANIC_PANICKED and PVPANIC_CRASH_LOADED
are still used in pvpanic.c directly, so we should
include standard-headers/linux/pvpanic.h to avoid depending
on which header includes which.
I fixed up the patch.
> static void handle_event(int event)
> {
> static bool logged;
>
> - if (event & ~(PVPANIC_PANICKED | PVPANIC_CRASH_LOADED) && !logged) {
> + if (event & ~PVPANIC_EVENTS && !logged) {
> qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown event %#x.\n", event);
> logged = true;
> }
> diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h
> index fab94165d03d..947468b81b1a 100644
> --- a/include/hw/misc/pvpanic.h
> +++ b/include/hw/misc/pvpanic.h
> @@ -18,6 +18,10 @@
> #include "exec/memory.h"
> #include "qom/object.h"
>
> +#include "standard-headers/linux/pvpanic.h"
> +
> +#define PVPANIC_EVENTS (PVPANIC_PANICKED | PVPANIC_CRASH_LOADED)
> +
> #define TYPE_PVPANIC_ISA_DEVICE "pvpanic"
> #define TYPE_PVPANIC_PCI_DEVICE "pvpanic-pci"
>
>
> --
> 2.45.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events
2024-06-21 10:26 ` Michael S. Tsirkin
@ 2024-06-21 10:45 ` Thomas Weißschuh
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2024-06-21 10:45 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Cornelia Huck, Paolo Bonzini, Thomas Huth, Laurent Vivier,
Eric Blake, Markus Armbruster, qemu-devel, Alejandro Jimenez, kvm
On 2024-06-21 06:26:19+0000, Michael S. Tsirkin wrote:
> On Mon, May 27, 2024 at 08:27:49AM +0200, Thomas Weißschuh wrote:
<snip>
> > diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
> > index 1540e9091a45..a4982cc5928e 100644
> > --- a/hw/misc/pvpanic.c
> > +++ b/hw/misc/pvpanic.c
> > @@ -21,13 +21,12 @@
> > #include "hw/qdev-properties.h"
> > #include "hw/misc/pvpanic.h"
> > #include "qom/object.h"
> > -#include "standard-headers/linux/pvpanic.h"
>
>
> This part is wrong. PVPANIC_PANICKED and PVPANIC_CRASH_LOADED
> are still used in pvpanic.c directly, so we should
> include standard-headers/linux/pvpanic.h to avoid depending
> on which header includes which.
Ack.
> I fixed up the patch.
Thanks!
<snip>
Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-06-21 10:46 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27 6:27 [PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory Thomas Weißschuh
2024-05-27 6:33 ` Thomas Huth
2024-05-27 6:27 ` [PATCH v8 2/8] linux-headers: update to 6.10-rc1 Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events Thomas Weißschuh
2024-06-21 10:26 ` Michael S. Tsirkin
2024-06-21 10:45 ` Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 4/8] tests/qtest/pvpanic: use centralized " Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 5/8] hw/misc/pvpanic: add support for normal shutdowns Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 6/8] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 7/8] tests/qtest/pvpanic: add tests for pvshutdown event Thomas Weißschuh
2024-05-27 6:27 ` [PATCH v8 8/8] Revert "docs/specs/pvpanic: mark shutdown event as not implemented" Thomas Weißschuh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).