Skip to contentSkip to conversation

s390x fixes, removal of deprecated options, netbsd VM fix

GIT PULL Applied Thomas Huth 2 participants 13 messages Jan 19, 2024 – Jan 22, 2024

lore
Share & tools
lore
#0 lore raw

The following changes since commit 88cf5fec91e50cd34bc002b633b4116228db0bc8:

Merge tag 'pull-target-arm-20240118' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-01-18 12:48:17 +0000)

are available in the Git repository at:

https://gitlab.com/thuth/qemu.git tags/pull-request-2024-01-19

for you to fetch changes up to 4a27d97c80b90215b33a092a1c3a5efcc987b582:

tests/vm/netbsd: Remove missing py311-expat package (2024-01-19 11:38:32 +0100)

----------------------------------------------------------------
- Fix s390x ISM reset
- Remove deprecated CLI options -no-hpet, -no-acpi, -async-teardown, -chroot and -singlestep
- Fix installation of the netbsd VM

----------------------------------------------------------------
Matthew Rosato (3):

      s390x/pci: avoid double enable/disable of aif
      s390x/pci: refresh fh before disabling aif
      s390x/pci: drive ISM reset from subsystem reset

Philippe Mathieu-Daudé (4):
qapi: Remove deprecated 'singlestep' member of StatusInfo
hmp: Remove deprecated 'singlestep' command
cli: Remove deprecated '-singlestep' command line option tests/vm/netbsd: Remove missing py311-expat package

Thomas Huth (4):
qemu-options: Remove the deprecated -no-hpet option
qemu-options: Remove the deprecated -no-acpi option
qemu-options: Remove the deprecated -async-teardown option
qemu-options: Remove the deprecated -chroot option

 docs/about/deprecated.rst       | 62 -----------------------------------------
 docs/about/removed-features.rst | 47 +++++++++++++++++++++++++++++++
 docs/specs/tpm.rst              |  4 +--
 docs/user/main.rst              |  6 ----
 qapi/run-state.json             | 11 --------
 include/hw/s390x/s390-pci-bus.h |  2 ++
 bsd-user/main.c                 |  3 +-
 hw/i386/pc.c                    |  4 +--
 hw/s390x/s390-pci-bus.c         | 26 +++++++++++------
 hw/s390x/s390-pci-kvm.c         | 34 ++++++++++++++++++++--
 hw/s390x/s390-virtio-ccw.c      |  8 ++++++
 linux-user/main.c               |  2 --
 system/runstate.c               |  8 ------
 system/vl.c                     | 37 +-----------------------
 tests/qtest/test-hmp.c          |  1 -
 hmp-commands.hx                 | 13 ---------
 qemu-options.hx                 | 46 ------------------------------
 tests/qemu-iotests/183.out      |  4 +--
 tests/qemu-iotests/234.out      |  8 +++---
 tests/qemu-iotests/262.out      |  4 +--
 tests/qemu-iotests/280.out      |  2 +-
 tests/vm/netbsd                 |  1 -
 22 files changed, 121 insertions(+), 212 deletions(-)
#1 lore raw

[PULL 03/11] s390x/pci: drive ISM reset from subsystem reset

From: Matthew Rosato <[email protected]>

ISM devices are sensitive to manipulation of the IOMMU, so the ISM device needs to be reset before the vfio-pci device is reset (triggering a full UNMAP). In order to ensure this occurs, trigger ISM device resets from subsystem_reset before triggering the PCI bus reset (which will also trigger vfio-pci reset). This only needs to be done for ISM devices which were enabled for use by the guest.
Further, ensure that AIF is disabled as part of the reset event.

Fixes ef1535901a ("s390x: do a subsystem reset before the unprotect on reboot")
Fixes 03451953c7 ("s390x/pci: reset ISM passthrough devices on shutdown and system reset")

Message-ID: <[email protected]>

---
 include/hw/s390x/s390-pci-bus.h |  1 +
 hw/s390x/s390-pci-bus.c         | 26 +++++++++++++++++---------
 hw/s390x/s390-virtio-ccw.c      |  8 ++++++++
 3 files changed, 26 insertions(+), 9 deletions(-)
include/hw/s390x/s390-pci-bus.h +1 -0
index 435e788867..2c43ea123f 100644
@@ -401,5 +401,6 @@ S390PCIBusDevice *s390_pci_find_dev_by_target(S390pciState *s,
                                               const char *target);
 S390PCIBusDevice *s390_pci_find_next_avail_dev(S390pciState *s,
                                                S390PCIBusDevice *pbdev);
+void s390_pci_ism_reset(void);
 
 #endif
hw/s390x/s390-pci-bus.c +17 -9
index 347580ebac..3e57d5faca 100644
@@ -151,20 +151,12 @@ static void s390_pci_shutdown_notifier(Notifier *n, void *opaque)
     pci_device_reset(pbdev->pdev);
 }
 
-static void s390_pci_reset_cb(void *opaque)
-{
-    S390PCIBusDevice *pbdev = opaque;
-
-    pci_device_reset(pbdev->pdev);
-}
-
 static void s390_pci_perform_unplug(S390PCIBusDevice *pbdev)
 {
     HotplugHandler *hotplug_ctrl;
 
     if (pbdev->pft == ZPCI_PFT_ISM) {
         notifier_remove(&pbdev->shutdown_notifier);
-        qemu_unregister_reset(s390_pci_reset_cb, pbdev);
     }
 
     /* Unplug the PCI device */
@@ -1132,7 +1124,6 @@ static void s390_pcihost_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
             if (pbdev->pft == ZPCI_PFT_ISM) {
                 pbdev->shutdown_notifier.notify = s390_pci_shutdown_notifier;
                 qemu_register_shutdown_notifier(&pbdev->shutdown_notifier);
-                qemu_register_reset(s390_pci_reset_cb, pbdev);
             }
         } else {
             pbdev->fh |= FH_SHM_EMUL;
@@ -1279,6 +1270,23 @@ static void s390_pci_enumerate_bridge(PCIBus *bus, PCIDevice *pdev,
     pci_default_write_config(pdev, PCI_SUBORDINATE_BUS, s->bus_no, 1);
 }
 
+void s390_pci_ism_reset(void)
+{
+    S390pciState *s = s390_get_phb();
+
+    S390PCIBusDevice *pbdev, *next;
+
+    /* Trigger reset event for each passthrough ISM device currently in-use */
+    QTAILQ_FOREACH_SAFE(pbdev, &s->zpci_devs, link, next) {
+        if (pbdev->interp && pbdev->pft == ZPCI_PFT_ISM &&
+            pbdev->fh & FH_MASK_ENABLE) {
+            s390_pci_kvm_aif_disable(pbdev);
+
+            pci_device_reset(pbdev->pdev);
+        }
+    }
+}
+
 static void s390_pcihost_reset(DeviceState *dev)
 {
     S390pciState *s = S390_PCI_HOST_BRIDGE(dev);
hw/s390x/s390-virtio-ccw.c +8 -0
index eaf61d3640..c99682b07d 100644
@@ -118,6 +118,14 @@ static void subsystem_reset(void)
     DeviceState *dev;
     int i;
 
+    /*
+     * ISM firmware is sensitive to unexpected changes to the IOMMU, which can
+     * occur during reset of the vfio-pci device (unmap of entire aperture).
+     * Ensure any passthrough ISM devices are reset now, while CPUs are paused
+     * but before vfio-pci cleanup occurs.
+     */
+    s390_pci_ism_reset();
+
     for (i = 0; i < ARRAY_SIZE(reset_dev_types); i++) {
         dev = DEVICE(object_resolve_path_type("", reset_dev_types[i], NULL));
         if (dev) {
Signature · 1 line
2.43.0
#2 lore raw

[PULL 05/11] qemu-options: Remove the deprecated -no-acpi option

In reply to Thomas Huth

It's been marked as deprecated since QEMU 8.0, so it should be fine to remove this now.

Message-ID: <[email protected]>

---
 docs/about/deprecated.rst       | 6 ------
 docs/about/removed-features.rst | 5 +++++
 docs/specs/tpm.rst              | 4 ++--
 hw/i386/pc.c                    | 4 ++--
 system/vl.c                     | 4 ----
 qemu-options.hx                 | 9 ---------
 6 files changed, 9 insertions(+), 23 deletions(-)
docs/about/deprecated.rst +0 -6
index 3dcb652132..aa2cbe0d74 100644
@@ -63,12 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-no-acpi`` (since 8.0)
-''''''''''''''''''''''''
-
-The ``-no-acpi`` setting has been turned into a machine property.
-Use ``-machine acpi=off`` instead.
-
 ``-async-teardown`` (since 8.1)
 '''''''''''''''''''''''''''''''
 
docs/about/removed-features.rst +5 -0
index 52d240ade9..ae728b6130 100644
@@ -466,6 +466,11 @@ line if the ``-nodefaults`` options is used.
 The HPET setting has been turned into a machine property.
 Use ``-machine hpet=off`` instead.
 
+``-no-acpi`` (removed in 9.0)
+'''''''''''''''''''''''''''''
+
+The ``-no-acpi`` setting has been turned into a machine property.
+Use ``-machine acpi=off`` instead.
 
 
 QEMU Machine Protocol (QMP) commands
docs/specs/tpm.rst +2 -2
index c96776a369..68cb8cf7e6 100644
@@ -343,9 +343,9 @@ In case an Arm virt machine is emulated, use the following command line:
 
 .. code-block:: console
 
-  qemu-system-aarch64 -machine virt,gic-version=3,accel=kvm \
+  qemu-system-aarch64 -machine virt,gic-version=3,acpi=off \
     -cpu host -m 4G \
-    -nographic -no-acpi \
+    -nographic -accel kvm \
     -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
     -tpmdev emulator,id=tpm0,chardev=chrtpm \
     -device tpm-tis-device,tpmdev=tpm0 \
hw/i386/pc.c +2 -2
index 496498df3a..803244e5cc 100644
@@ -1348,7 +1348,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
     Error *local_err = NULL;
 
     /*
-     * When -no-acpi is used with Q35 machine type, no ACPI is built,
+     * When "acpi=off" is used with the Q35 machine type, no ACPI is built,
      * but pcms->acpi_dev is still created. Check !acpi_enabled in
      * addition to cover this case.
      */
@@ -1396,7 +1396,7 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
     X86MachineState *x86ms = X86_MACHINE(hotplug_dev);
 
     /*
-     * When -no-acpi is used with Q35 machine type, no ACPI is built,
+     * When "acpi=off" is used with the Q35 machine type, no ACPI is built,
      * but pcms->acpi_dev is still created. Check !acpi_enabled in
      * addition to cover this case.
      */
system/vl.c +0 -4
index f08c4c8193..7e258889f3 100644
@@ -3369,10 +3369,6 @@ void qemu_init(int argc, char **argv)
                 display_remote++;
                 break;
 #endif
-            case QEMU_OPTION_no_acpi:
-                warn_report("-no-acpi is deprecated, use '-machine acpi=off' instead");
-                qdict_put_str(machine_opts_dict, "acpi", "off");
-                break;
             case QEMU_OPTION_no_reboot:
                 olist = qemu_find_opts("action");
                 qemu_opts_parse_noisily(olist, "reboot=shutdown", false);
qemu-options.hx +0 -9
index 38d38abd6d..844a189fb0 100644
@@ -2647,15 +2647,6 @@ SRST
     needed to boot from old floppy disks.
 ERST
 
-DEF("no-acpi", 0, QEMU_OPTION_no_acpi,
-           "-no-acpi        disable ACPI\n", QEMU_ARCH_I386 | QEMU_ARCH_ARM)
-SRST
-``-no-acpi``
-    Disable ACPI (Advanced Configuration and Power Interface) support.
-    Use it if your guest OS complains about ACPI problems (PC target
-    machine only).
-ERST
-
 DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
     "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n"
     "                ACPI table description\n", QEMU_ARCH_I386)
Signature · 1 line
2.43.0
#3 lore raw

[PULL 08/11] qapi: Remove deprecated 'singlestep' member of StatusInfo

In reply to Thomas Huth

From: Philippe Mathieu-Daudé <[email protected]>

This member has been deprecated before the 8.1 release, in commit 34c18203d4 ("qmp: Deprecate 'singlestep' member of StatusInfo"). Time to drop it.

Message-ID: <[email protected]>

---
 docs/about/deprecated.rst  | 14 --------------
 qapi/run-state.json        | 11 -----------
 system/runstate.c          |  8 --------
 tests/qemu-iotests/183.out |  4 ++--
 tests/qemu-iotests/234.out |  8 ++++----
 tests/qemu-iotests/262.out |  4 ++--
 tests/qemu-iotests/280.out |  2 +-
 7 files changed, 9 insertions(+), 42 deletions(-)
docs/about/deprecated.rst +0 -14
index 9a2c994617..25527da423 100644
@@ -151,20 +151,6 @@ accepted incorrect commands will return an error. Users should make sure that
 all arguments passed to ``device_add`` are consistent with the documented
 property types.
 
-``StatusInfo`` member ``singlestep`` (since 8.1)
-''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``singlestep`` member of the ``StatusInfo`` returned from the
-``query-status`` command is deprecated. This member has a confusing
-name and it never did what the documentation claimed or what its name
-suggests. We do not believe that anybody is actually using the
-information provided in this member.
-
-The information it reports is whether the TCG JIT is in "one
-instruction per translated block" mode (which can be set on the
-command line or via the HMP, but not via QMP). The information remains
-available via the HMP 'info jit' command.
-
 QEMU Machine Protocol (QMP) events
 ----------------------------------
 
qapi/run-state.json +0 -11
index ca05502e0a..08bc99cb85 100644
@@ -106,25 +106,15 @@
 #
 # @running: true if all VCPUs are runnable, false if not runnable
 #
-# @singlestep: true if using TCG with one guest instruction per
-#     translation block
-#
 # @status: the virtual machine @RunState
 #
 # Features:
 #
-# @deprecated: Member 'singlestep' is deprecated (with no
-#     replacement).
-#
 # Since: 0.14
 #
-# Notes: @singlestep is enabled on the command line with '-accel
-#     tcg,one-insn-per-tb=on', or with the HMP 'one-insn-per-tb'
-#     command.
 ##
 { 'struct': 'StatusInfo',
   'data': {'running': 'bool',
-           'singlestep': { 'type': 'bool', 'features': [ 'deprecated' ]},
            'status': 'RunState'} }
 
 ##
@@ -140,7 +130,6 @@
 #
 # -> { "execute": "query-status" }
 # <- { "return": { "running": true,
-#                  "singlestep": false,
 #                  "status": "running" } }
 ##
 { 'command': 'query-status', 'returns': 'StatusInfo',
system/runstate.c +0 -8
index fb07b7b71a..d6ab860eca 100644
@@ -242,15 +242,7 @@ bool runstate_needs_reset(void)
 StatusInfo *qmp_query_status(Error **errp)
 {
     StatusInfo *info = g_malloc0(sizeof(*info));
-    AccelState *accel = current_accel();
 
-    /*
-     * We ignore errors, which will happen if the accelerator
-     * is not TCG. "singlestep" is meaningless for other accelerators,
-     * so we will set the StatusInfo field to false for those.
-     */
-    info->singlestep = object_property_get_bool(OBJECT(accel),
-                                                "one-insn-per-tb", NULL);
     info->running = runstate_is_running();
     info->status = current_run_state;
 
tests/qemu-iotests/183.out +2 -2
index fd9c2e52a5..9277643853 100644
@@ -30,13 +30,13 @@ read 65536/65536 bytes at offset 0
        'arguments': { 'uri': 'unix:SOCK_DIR/migrate', 'blk': true } }
 {"return": {}}
 { 'execute': 'query-status' }
-{"return": {"status": "postmigrate", "singlestep": false, "running": false}}
+{"return": {"status": "postmigrate", "running": false}}
 
 === Do some I/O on the destination ===
 
 { 'execute': 'query-status' }
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "RESUME"}
-{"return": {"status": "running", "singlestep": false, "running": true}}
+{"return": {"status": "running", "running": true}}
 { 'execute': 'human-monitor-command',
        'arguments': { 'command-line':
                       'qemu-io disk "read -P 0x55 0 64k"' } }
tests/qemu-iotests/234.out +4 -4
index 692976d1c6..ac8b64350c 100644
@@ -15,8 +15,8 @@ Starting migration to B...
 {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
 completed
 completed
-{"return": {"running": false, "singlestep": false, "status": "postmigrate"}}
-{"return": {"running": true, "singlestep": false, "status": "running"}}
+{"return": {"running": false, "status": "postmigrate"}}
+{"return": {"running": true, "status": "running"}}
 Add a second parent to drive0-file...
 {"return": {}}
 Restart A with -incoming and second parent...
@@ -32,5 +32,5 @@ Starting migration back to A...
 {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
 completed
 completed
-{"return": {"running": true, "singlestep": false, "status": "running"}}
-{"return": {"running": false, "singlestep": false, "status": "postmigrate"}}
+{"return": {"running": true, "status": "running"}}
+{"return": {"running": false, "status": "postmigrate"}}
tests/qemu-iotests/262.out +2 -2
index 8e04c496c4..b8a2d3598d 100644
@@ -13,5 +13,5 @@ Starting migration to B...
 {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
 completed
 completed
-{"return": {"running": false, "singlestep": false, "status": "postmigrate"}}
-{"return": {"running": true, "singlestep": false, "status": "running"}}
+{"return": {"running": false, "status": "postmigrate"}}
+{"return": {"running": true, "status": "running"}}
tests/qemu-iotests/280.out +1 -1
index c75f437c00..546dbb4a68 100644
@@ -12,7 +12,7 @@ Enabling migration QMP events on VM...
 VM is now stopped:
 completed
 {"execute": "query-status", "arguments": {}}
-{"return": {"running": false, "singlestep": false, "status": "postmigrate"}}
+{"return": {"running": false, "status": "postmigrate"}}
 
 === Create a snapshot of the disk image ===
 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-top", "size": 0}}}
Signature · 1 line
2.43.0
#4 lore raw

[PULL 04/11] qemu-options: Remove the deprecated -no-hpet option

In reply to Thomas Huth

It's been marked as deprecated since QEMU 8.0, so it should be fine to remove this now.

Message-ID: <[email protected]>

---
 docs/about/deprecated.rst       | 6 ------
 docs/about/removed-features.rst | 8 ++++++++
 system/vl.c                     | 4 ----
 qemu-options.hx                 | 7 -------
 4 files changed, 8 insertions(+), 17 deletions(-)
docs/about/deprecated.rst +0 -6
index 2e15040246..3dcb652132 100644
@@ -63,12 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-no-hpet`` (since 8.0)
-''''''''''''''''''''''''
-
-The HPET setting has been turned into a machine property.
-Use ``-machine hpet=off`` instead.
-
 ``-no-acpi`` (since 8.0)
 ''''''''''''''''''''''''
 
docs/about/removed-features.rst +8 -0
index f04036987b..52d240ade9 100644
@@ -460,6 +460,14 @@ in this case.
 Note that the default audio backend must be configured on the command
 line if the ``-nodefaults`` options is used.
 
+``-no-hpet`` (removed in 9.0)
+'''''''''''''''''''''''''''''
+
+The HPET setting has been turned into a machine property.
+Use ``-machine hpet=off`` instead.
+
+
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
system/vl.c +0 -4
index 53850a1daf..f08c4c8193 100644
@@ -3373,10 +3373,6 @@ void qemu_init(int argc, char **argv)
                 warn_report("-no-acpi is deprecated, use '-machine acpi=off' instead");
                 qdict_put_str(machine_opts_dict, "acpi", "off");
                 break;
-            case QEMU_OPTION_no_hpet:
-                warn_report("-no-hpet is deprecated, use '-machine hpet=off' instead");
-                qdict_put_str(machine_opts_dict, "hpet", "off");
-                break;
             case QEMU_OPTION_no_reboot:
                 olist = qemu_find_opts("action");
                 qemu_opts_parse_noisily(olist, "reboot=shutdown", false);
qemu-options.hx +0 -7
index 1912b19cb8..38d38abd6d 100644
@@ -2656,13 +2656,6 @@ SRST
     machine only).
 ERST
 
-DEF("no-hpet", 0, QEMU_OPTION_no_hpet,
-    "-no-hpet        disable HPET\n", QEMU_ARCH_I386)
-SRST
-``-no-hpet``
-    Disable HPET support. Deprecated, use '-machine hpet=off' instead.
-ERST
-
 DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
     "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n"
     "                ACPI table description\n", QEMU_ARCH_I386)
Signature · 1 line
2.43.0
#5 lore raw

[PULL 06/11] qemu-options: Remove the deprecated -async-teardown option

In reply to Thomas Huth

It's been marked as deprecated since QEMU 8.1 (and was only available since QEMU 8.0 anyway), so it should be fine to remove this now.

Message-ID: <[email protected]>

---
 docs/about/deprecated.rst       |  5 -----
 docs/about/removed-features.rst |  5 +++++
 system/vl.c                     |  6 ------
 qemu-options.hx                 | 10 ----------
 4 files changed, 5 insertions(+), 21 deletions(-)
docs/about/deprecated.rst +0 -5
index aa2cbe0d74..1c92a17896 100644
@@ -63,11 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-async-teardown`` (since 8.1)
-'''''''''''''''''''''''''''''''
-
-Use ``-run-with async-teardown=on`` instead.
-
 ``-chroot`` (since 8.1)
 '''''''''''''''''''''''
 
docs/about/removed-features.rst +5 -0
index ae728b6130..43f64a26ba 100644
@@ -472,6 +472,11 @@ Use ``-machine hpet=off`` instead.
 The ``-no-acpi`` setting has been turned into a machine property.
 Use ``-machine acpi=off`` instead.
 
+``-async-teardown`` (removed in 9.0)
+''''''''''''''''''''''''''''''''''''
+
+Use ``-run-with async-teardown=on`` instead.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
system/vl.c +0 -6
index 7e258889f3..924356f864 100644
@@ -3600,12 +3600,6 @@ void qemu_init(int argc, char **argv)
             case QEMU_OPTION_daemonize:
                 os_set_daemonize(true);
                 break;
-#if defined(CONFIG_LINUX)
-            /* deprecated */
-            case QEMU_OPTION_asyncteardown:
-                init_async_teardown();
-                break;
-#endif
             case QEMU_OPTION_run_with: {
                 const char *str;
                 opts = qemu_opts_parse_noisily(qemu_find_opts("run-with"),
qemu-options.hx +0 -10
index 844a189fb0..8299f5cc0f 100644
@@ -4977,16 +4977,6 @@ HXCOMM Internal use
 DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, "", QEMU_ARCH_ALL)
 DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL)
 
-#ifdef __linux__
-DEF("async-teardown", 0, QEMU_OPTION_asyncteardown,
-    "-async-teardown enable asynchronous teardown\n",
-    QEMU_ARCH_ALL)
-SRST
-``-async-teardown``
-    This option is deprecated and should no longer be used. The new option
-    ``-run-with async-teardown=on`` is a replacement.
-ERST
-#endif
 #ifdef CONFIG_POSIX
 DEF("run-with", HAS_ARG, QEMU_OPTION_run_with,
     "-run-with [async-teardown=on|off][,chroot=dir]\n"
Signature · 1 line
2.43.0
#6 lore raw

[PULL 07/11] qemu-options: Remove the deprecated -chroot option

In reply to Thomas Huth

It's been marked as deprecated since QEMU 8.1, so it should be fine to remove this now.

Message-ID: <[email protected]>

---
 docs/about/deprecated.rst       |  5 -----
 docs/about/removed-features.rst |  5 +++++
 system/vl.c                     |  5 -----
 qemu-options.hx                 | 12 ------------
 4 files changed, 5 insertions(+), 22 deletions(-)
docs/about/deprecated.rst +0 -5
index 1c92a17896..9a2c994617 100644
@@ -63,11 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-chroot`` (since 8.1)
-'''''''''''''''''''''''
-
-Use ``-run-with chroot=dir`` instead.
-
 ``-singlestep`` (since 8.1)
 '''''''''''''''''''''''''''
 
docs/about/removed-features.rst +5 -0
index 43f64a26ba..a8546f4787 100644
@@ -477,6 +477,11 @@ Use ``-machine acpi=off`` instead.
 
 Use ``-run-with async-teardown=on`` instead.
 
+``-chroot`` (removed in 9.0)
+''''''''''''''''''''''''''''
+
+Use ``-run-with chroot=dir`` instead.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
system/vl.c +0 -5
index 924356f864..c125fb9079 100644
@@ -3592,11 +3592,6 @@ void qemu_init(int argc, char **argv)
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_chroot:
-                warn_report("option is deprecated,"
-                            " use '-run-with chroot=...' instead");
-                os_set_chroot(optarg);
-                break;
             case QEMU_OPTION_daemonize:
                 os_set_daemonize(true);
                 break;
qemu-options.hx +0 -12
index 8299f5cc0f..42d813474b 100644
@@ -4792,18 +4792,6 @@ SRST
     ``-nodefaults`` option will disable all those default devices.
 ERST
 
-#ifndef _WIN32
-DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
-    "-chroot dir     chroot to dir just before starting the VM (deprecated)\n",
-    QEMU_ARCH_ALL)
-#endif
-SRST
-``-chroot dir``
-    Deprecated, use '-run-with chroot=...' instead.
-    Immediately before starting guest execution, chroot to the specified
-    directory. Especially useful in combination with -runas.
-ERST
-
 #ifndef _WIN32
 DEF("runas", HAS_ARG, QEMU_OPTION_runas, \
     "-runas user     change to user id user just before starting the VM\n" \
Signature · 1 line
2.43.0
#7 lore raw

[PULL 09/11] hmp: Remove deprecated 'singlestep' command

In reply to Thomas Huth

From: Philippe Mathieu-Daudé <[email protected]>

This command has been deprecated before the 8.1 release, in commit e9ccfdd91d ("hmp: Add 'one-insn-per-tb' command equivalent to 'singlestep'"). Time to drop it.

Message-ID: <[email protected]>

---
 docs/about/deprecated.rst       |  9 ---------
 docs/about/removed-features.rst |  6 ++++++
 tests/qtest/test-hmp.c          |  1 -
 hmp-commands.hx                 | 13 -------------
 4 files changed, 6 insertions(+), 23 deletions(-)
docs/about/deprecated.rst +0 -9
index 25527da423..316a26a82c 100644
@@ -167,15 +167,6 @@ points was removed in 7.0. However QMP still exposed the vcpu
 parameter. This argument has now been deprecated and the remaining
 remaining trace points that used it are selected just by name.
 
-Human Monitor Protocol (HMP) commands
--------------------------------------
-
-``singlestep`` (since 8.1)
-''''''''''''''''''''''''''
-
-The ``singlestep`` command has been replaced by the ``one-insn-per-tb``
-command, which has the same behaviour but a less misleading name.
-
 Host Architectures
 ------------------
 
docs/about/removed-features.rst +6 -0
index a8546f4787..855d788259 100644
@@ -635,6 +635,12 @@ Use ``migrate-set-parameters`` instead.
 
 This command didn't produce any output already. Removed with no replacement.
 
+``singlestep`` (removed in 9.0)
+'''''''''''''''''''''''''''''''
+
+The ``singlestep`` command has been replaced by the ``one-insn-per-tb``
+command, which has the same behaviour but a less misleading name.
+
 Guest Emulator ISAs
 -------------------
 
tests/qtest/test-hmp.c +0 -1
index fc9125f8bb..1b2e07522f 100644
@@ -64,7 +64,6 @@ static const char *hmp_cmds[] = {
     "qom-get /machine initrd",
     "screendump /dev/null",
     "sendkey x",
-    "singlestep on",
     "wavcapture /dev/null",
     "stopcapture 0",
     "sum 0 512",
hmp-commands.hx +0 -13
index 2db5701d49..17b5ea839d 100644
@@ -398,19 +398,6 @@ SRST
   If called with option off, the emulation returns to normal mode.
 ERST
 
-    {
-        .name       = "singlestep",
-        .args_type  = "option:s?",
-        .params     = "[on|off]",
-        .help       = "deprecated synonym for one-insn-per-tb",
-        .cmd        = hmp_one_insn_per_tb,
-    },
-
-SRST
-``singlestep [off]``
-  This is a deprecated synonym for the one-insn-per-tb command.
-ERST
-
     {
         .name       = "stop|s",
         .args_type  = "",
Signature · 1 line
2.43.0
#8 lore raw

[PULL 01/11] s390x/pci: avoid double enable/disable of aif

In reply to Thomas Huth

From: Matthew Rosato <[email protected]>

Use a flag to keep track of whether AIF is currently enabled. This can be used to avoid enabling/disabling AIF multiple times as well as to determine whether or not it should be disabled during reset processing.

Fixes d0bc7091c2 ("s390x/pci: enable adapter event notification for interpreted devices")

Message-ID: <[email protected]>

---
 include/hw/s390x/s390-pci-bus.h |  1 +
 hw/s390x/s390-pci-kvm.c         | 25 +++++++++++++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)
include/hw/s390x/s390-pci-bus.h +1 -0
index b1bdbeaeb5..435e788867 100644
@@ -361,6 +361,7 @@ struct S390PCIBusDevice {
     bool unplug_requested;
     bool interp;
     bool forwarding_assist;
+    bool aif;
     QTAILQ_ENTRY(S390PCIBusDevice) link;
 };
 
hw/s390x/s390-pci-kvm.c +23 -2
index ff41e4106d..1ee510436c 100644
@@ -27,6 +27,7 @@ bool s390_pci_kvm_interp_allowed(void)
 
 int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool assist)
 {
+    int rc;
     struct kvm_s390_zpci_op args = {
         .fh = pbdev->fh,
         .op = KVM_S390_ZPCIOP_REG_AEN,
@@ -38,15 +39,35 @@ int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool assist)
         .u.reg_aen.flags = (assist) ? 0 : KVM_S390_ZPCIOP_REGAEN_HOST
     };
 
-    return kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args);
+    if (pbdev->aif) {
+        return -EINVAL;
+    }
+
+    rc = kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args);
+    if (rc == 0) {
+        pbdev->aif = true;
+    }
+
+    return rc;
 }
 
 int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev)
 {
+    int rc;
+
     struct kvm_s390_zpci_op args = {
         .fh = pbdev->fh,
         .op = KVM_S390_ZPCIOP_DEREG_AEN
     };
 
-    return kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args);
+    if (!pbdev->aif) {
+        return -EINVAL;
+    }
+
+    rc = kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args);
+    if (rc == 0) {
+        pbdev->aif = false;
+    }
+
+    return rc;
 }
Signature · 1 line
2.43.0
#9 lore raw

[PULL 02/11] s390x/pci: refresh fh before disabling aif

In reply to Thomas Huth

From: Matthew Rosato <[email protected]>

Typically we refresh the host fh during CLP enable, however it's possible that the device goes through multiple reset events before the guest performs another CLP enable. Let's handle this for now by refreshing the host handle from vfio before disabling aif.

Fixes 03451953c7 ("s390x/pci: reset ISM passthrough devices on shutdown and system reset")

Message-ID: <[email protected]>

---
 hw/s390x/s390-pci-kvm.c | 9 +++++++++
 1 file changed, 9 insertions(+)
hw/s390x/s390-pci-kvm.c +9 -0
index 1ee510436c..9eef4fc3ec 100644
@@ -18,6 +18,7 @@
 #include "hw/s390x/s390-pci-bus.h"
 #include "hw/s390x/s390-pci-kvm.h"
 #include "hw/s390x/s390-pci-inst.h"
+#include "hw/s390x/s390-pci-vfio.h"
 #include "cpu_models.h"
 
 bool s390_pci_kvm_interp_allowed(void)
@@ -64,6 +65,14 @@ int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev)
         return -EINVAL;
     }
 
+    /*
+     * The device may have already been reset but we still want to relinquish
+     * the guest ISC, so always be sure to use an up-to-date host fh.
+     */
+    if (!s390_pci_get_host_fh(pbdev, &args.fh)) {
+        return -EPERM;
+    }
+
     rc = kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args);
     if (rc == 0) {
         pbdev->aif = false;
Signature · 1 line
2.43.0
#10 lore raw

[PULL 11/11] tests/vm/netbsd: Remove missing py311-expat package

In reply to Thomas Huth

From: Philippe Mathieu-Daudé <[email protected]>

Since the pkgsrc-2023Q3 release [*], the py-expat package has been merged into the base 'python' package:

- Several packages have been folded into base packages. While the result is simpler, those updating may need to force-remove the secondary packages, depending on the update method. When doing make replace, one has to pkg_delete -f the secondary packages. pkgin handles at least the python packages correctly, removing the split package when updating python. Specific packages and the former packages now included:

* cairo: cairo-gobject
* python: py-cElementTree py-curses py-cursespanel py-expat py-readline py-sqlite3

Remove py311-expat from the package list in order to avoid:

### Installing packages ...
processing remote summary (http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/amd64/9.3/All)...
database for http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/amd64/9.3/All is up-to-date py311-expat is not available in the repository
...
calculating dependencies.../py311-expat is not available in the repository pkg_install error log can be found in /var/db/pkgin/pkg_install-err.log

[*] https://mail-index.netbsd.org/netbsd-announce/2024/01/01/msg000360.html

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2109

Message-ID: <[email protected]>

---
 tests/vm/netbsd | 1 -
 1 file changed, 1 deletion(-)
tests/vm/netbsd +0 -1
index 649fcad353..a3f6dd6b3c 100755
@@ -31,7 +31,6 @@ class NetBSDVM(basevm.BaseVM):
         "pkgconf",
         "xz",
         "python311",
-        "py311-expat",
         "ninja-build",
 
         # gnu tools
Signature · 1 line
2.43.0
#11 lore raw

[PULL 10/11] cli: Remove deprecated '-singlestep' command line option

In reply to Thomas Huth

From: Philippe Mathieu-Daudé <[email protected]>

This option has been deprecated before the 8.1 release, in commit 12fd0f41d0 ("Document that -singlestep command line option is deprecated"). Time to drop it.

Message-ID: <[email protected]>

---
 docs/about/deprecated.rst       | 17 -----------------
 docs/about/removed-features.rst | 18 ++++++++++++++++++
 docs/user/main.rst              |  6 ------
 bsd-user/main.c                 |  3 +--
 linux-user/main.c               |  2 --
 system/vl.c                     | 18 +-----------------
 qemu-options.hx                 |  8 --------
 7 files changed, 20 insertions(+), 52 deletions(-)
docs/about/deprecated.rst +0 -17
index 316a26a82c..f47446c079 100644
@@ -63,23 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-singlestep`` (since 8.1)
-'''''''''''''''''''''''''''
-
-The ``-singlestep`` option has been turned into an accelerator property,
-and given a name that better reflects what it actually does.
-Use ``-accel tcg,one-insn-per-tb=on`` instead.
-
-User-mode emulator command line arguments
------------------------------------------
-
-``-singlestep`` (since 8.1)
-'''''''''''''''''''''''''''
-
-The ``-singlestep`` option has been given a name that better reflects
-what it actually does. For both linux-user and bsd-user, use the
-new ``-one-insn-per-tb`` option instead.
-
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
docs/about/removed-features.rst +18 -0
index 855d788259..54081a6c19 100644
@@ -482,6 +482,24 @@ Use ``-run-with async-teardown=on`` instead.
 
 Use ``-run-with chroot=dir`` instead.
 
+``-singlestep`` (removed in 9.0)
+''''''''''''''''''''''''''''''''
+
+The ``-singlestep`` option has been turned into an accelerator property,
+and given a name that better reflects what it actually does.
+Use ``-accel tcg,one-insn-per-tb=on`` instead.
+
+
+User-mode emulator command line arguments
+-----------------------------------------
+
+``-singlestep`` (removed in 9.0)
+''''''''''''''''''''''''''''''''
+
+The ``-singlestep`` option has been given a name that better reflects
+what it actually does. For both linux-user and bsd-user, use the
+``-one-insn-per-tb`` option instead.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
docs/user/main.rst +0 -6
index f478635396..7e7ad07409 100644
@@ -98,9 +98,6 @@ Debug options:
    This slows down emulation a lot, but can be useful in some situations,
    such as when trying to analyse the logs produced by the ``-d`` option.
 
-``-singlestep``
-   This is a deprecated synonym for the ``-one-insn-per-tb`` option.
-
 Environment variables:
 
 QEMU_STRACE
@@ -251,6 +248,3 @@ Debug options:
    Run the emulation with one guest instruction per translation block.
    This slows down emulation a lot, but can be useful in some situations,
    such as when trying to analyse the logs produced by the ``-d`` option.
-
-``-singlestep``
-   This is a deprecated synonym for the ``-one-insn-per-tb`` option.
bsd-user/main.c +1 -2
index 4de226d211..e5efb7b845 100644
@@ -163,7 +163,6 @@ static void usage(void)
            "                  (use '-d help' for a list of log items)\n"
            "-D logfile        write logs to 'logfile' (default stderr)\n"
            "-one-insn-per-tb  run with one guest instruction per emulated TB\n"
-           "-singlestep       deprecated synonym for -one-insn-per-tb\n"
            "-strace           log system calls\n"
            "-trace            [[enable=]<pattern>][,events=<file>][,file=<file>]\n"
            "                  specify tracing options\n"
@@ -391,7 +390,7 @@ int main(int argc, char **argv)
             (void) envlist_unsetenv(envlist, "LD_PRELOAD");
         } else if (!strcmp(r, "seed")) {
             seed_optarg = optarg;
-        } else if (!strcmp(r, "singlestep") || !strcmp(r, "one-insn-per-tb")) {
+        } else if (!strcmp(r, "one-insn-per-tb")) {
             opt_one_insn_per_tb = true;
         } else if (!strcmp(r, "strace")) {
             do_strace = 1;
linux-user/main.c +0 -2
index 0cdaf30d34..c9470eeccf 100644
@@ -500,8 +500,6 @@ static const struct qemu_argument arg_table[] = {
     {"one-insn-per-tb",
                    "QEMU_ONE_INSN_PER_TB",  false, handle_arg_one_insn_per_tb,
      "",           "run with one guest instruction per emulated TB"},
-    {"singlestep", "QEMU_SINGLESTEP",  false, handle_arg_one_insn_per_tb,
-     "",           "deprecated synonym for -one-insn-per-tb"},
     {"strace",     "QEMU_STRACE",      false, handle_arg_strace,
      "",           "log system calls"},
     {"seed",       "QEMU_RAND_SEED",   true,  handle_arg_seed,
system/vl.c +1 -17
index c125fb9079..809f867bcc 100644
@@ -181,7 +181,6 @@ static const char *log_file;
 static bool list_data_dirs;
 static const char *qtest_chrdev;
 static const char *qtest_log;
-static bool opt_one_insn_per_tb;
 
 static int has_defaults = 1;
 static int default_audio = 1;
@@ -2308,19 +2307,7 @@ static int do_configure_accelerator(void *opaque, QemuOpts *opts, Error **errp)
     qemu_opt_foreach(opts, accelerator_set_property,
                      accel,
                      &error_fatal);
-    /*
-     * If legacy -singlestep option is set, honour it for TCG and
-     * silently ignore for any other accelerator (which is how this
-     * option has always behaved).
-     */
-    if (opt_one_insn_per_tb) {
-        /*
-         * This will always succeed for TCG, and we want to ignore
-         * the error from trying to set a nonexistent property
-         * on any other accelerator.
-         */
-        object_property_set_bool(OBJECT(accel), "one-insn-per-tb", true, NULL);
-    }
+
     ret = accel_init_machine(accel, current_machine);
     if (ret < 0) {
         if (!qtest_with_kvm || ret != -ENOENT) {
@@ -3057,9 +3044,6 @@ void qemu_init(int argc, char **argv)
             case QEMU_OPTION_bios:
                 qdict_put_str(machine_opts_dict, "firmware", optarg);
                 break;
-            case QEMU_OPTION_singlestep:
-                opt_one_insn_per_tb = true;
-                break;
             case QEMU_OPTION_S:
                 autostart = 0;
                 break;
qemu-options.hx +0 -8
index 42d813474b..24706ae109 100644
@@ -4359,14 +4359,6 @@ SRST
     from a script.
 ERST
 
-DEF("singlestep", 0, QEMU_OPTION_singlestep, \
-    "-singlestep     deprecated synonym for -accel tcg,one-insn-per-tb=on\n", QEMU_ARCH_ALL)
-SRST
-``-singlestep``
-    This is a deprecated synonym for the TCG accelerator property
-    ``one-insn-per-tb``.
-ERST
-
 DEF("preconfig", 0, QEMU_OPTION_preconfig, \
     "--preconfig     pause QEMU before machine is initialized (experimental)\n",
     QEMU_ARCH_ALL)
Signature · 1 line
2.43.0
#12 lore raw
In reply to Thomas Huth
Quoted 13 lines · Thomas Huth

The following changes since commit 88cf5fec91e50cd34bc002b633b4116228db0bc8:

Merge tag 'pull-target-arm-20240118' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-01-18 12:48:17 +0000)

are available in the Git repository at:

https://gitlab.com/thuth/qemu.git tags/pull-request-2024-01-19

for you to fetch changes up to 4a27d97c80b90215b33a092a1c3a5efcc987b582:

tests/vm/netbsd: Remove missing py311-expat package (2024-01-19 11:38:32 +0100)

Quoted 7 lines

----------------------------------------------------------------
- Fix s390x ISM reset
- Remove deprecated CLI options -no-hpet, -no-acpi, -async-teardown, -chroot and -singlestep
- Fix installation of the netbsd VM

----------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0
for any user-visible changes.

-- PMM