fd70385d | 02-Oct-2022 |
Juan Quintela <quintela@redhat.com> |
migration: Remove unused threshold_size parameter
Until previous commit, save_live_pending() was used for ram. Now with the split into state_pending_estimate() and state_pending_exact() it is not n
migration: Remove unused threshold_size parameter
Until previous commit, save_live_pending() was used for ram. Now with the split into state_pending_estimate() and state_pending_exact() it is not needed anymore, so remove them.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
dfa6ba6b | 16-Dec-2022 |
Peter Maydell <peter.maydell@linaro.org> |
Replace use of qdev_reset_all() with device_cold_reset()
The legacy function qdev_reset_all() performs a recursive reset, starting from a qdev. However, it does not permit any of the devices in the
Replace use of qdev_reset_all() with device_cold_reset()
The legacy function qdev_reset_all() performs a recursive reset, starting from a qdev. However, it does not permit any of the devices in the tree to use three-phase reset, because device reset goes through the device_legacy_reset() function that only calls the single DeviceClass::reset method.
Switch to using the device_cold_reset() function instead. This also performs a recursive reset, where first the children are reset and then finally the parent, but it uses the new (...in 2020...) Resettable mechanism, which supports both the old style single-reset method and also the new 3-phase reset handling.
This commit changes the five remaining uses of this function.
Commit created with: sed -i -e 's/qdev_reset_all/device_cold_reset/g' hw/i386/xen/xen_platform.c hw/input/adb.c hw/remote/vfio-user-obj.c hw/s390x/s390-virtio-ccw.c hw/usb/dev-uas.c
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
03451953 | 09-Dec-2022 |
Matthew Rosato <mjrosato@linux.ibm.com> |
s390x/pci: reset ISM passthrough devices on shutdown and system reset
ISM device firmware stores unique state information that can can cause a wholesale unmap of the associated IOMMU (e.g. when we g
s390x/pci: reset ISM passthrough devices on shutdown and system reset
ISM device firmware stores unique state information that can can cause a wholesale unmap of the associated IOMMU (e.g. when we get a termination signal for QEMU) to trigger firmware errors because firmware believes we are attempting to invalidate entries that are still in-use by the guest OS (when in fact that guest is in the process of being terminated or rebooted). To alleviate this, register both a shutdown notifier (for unexpected termination cases e.g. virsh destroy) as well as a reset callback (for cases like guest OS reboot). For each of these scenarios, trigger PCI device reset; this is enough to indicate to firmware that the IOMMU is no longer in-use by the guest OS, making it safe to invalidate any associated IOMMU entries.
Fixes: 15d0e7942d3b ("s390x/pci: don't fence interpreted devices without MSI-X") Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Message-Id: <20221209195700.263824-1-mjrosato@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> [thuth: Adjusted the hunk in s390-pci-vfio.c due to different context] Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
df202e3f | 28-Oct-2022 |
Matthew Rosato <mjrosato@linux.ibm.com> |
s390x/pci: shrink DMA aperture to be bound by vfio DMA limit
Currently, s390x-pci performs accounting against the vfio DMA limit and triggers the guest to clean up mappings when the limit is reached
s390x/pci: shrink DMA aperture to be bound by vfio DMA limit
Currently, s390x-pci performs accounting against the vfio DMA limit and triggers the guest to clean up mappings when the limit is reached. Let's go a step further and also limit the size of the supported DMA aperture reported to the guest based upon the initial vfio DMA limit reported for the container (if less than than the size reported by the firmware/host zPCI layer). This avoids processing sections of the guest DMA table during global refresh that, for common use cases, will never be used anway, and makes exhausting the vfio DMA limit due to mismatch between guest aperture size and host limit far less likely and more indicitive of an error.
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Message-Id: <20221028194758.204007-4-mjrosato@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
d3d1a406 | 07-Nov-2022 |
Cédric Le Goater <clg@redhat.com> |
s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines
zPCI enhancement features (interpretation and forward assist) were recently introduced to improve performance on PCI passthrough
s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines
zPCI enhancement features (interpretation and forward assist) were recently introduced to improve performance on PCI passthrough devices. To maintain the same behaviour on older Z machines, deactivate the features with the associated properties.
Signed-off-by: Cédric Le Goater <clg@redhat.com> Message-Id: <20221107161349.1032730-3-clg@kaod.org> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
6393b299 | 03-Nov-2022 |
Pierre Morel <pmorel@linux.ibm.com> |
s390x/cpu topology: add max_threads machine class attribute
The S390 CPU topology accepts the smp.threads argument while in reality it does not effectively allow multthreading.
Let's keep this beha
s390x/cpu topology: add max_threads machine class attribute
The S390 CPU topology accepts the smp.threads argument while in reality it does not effectively allow multthreading.
Let's keep this behavior for machines older than 7.2 and refuse to use threads in newer machines until multithreading is really exposed to the guest by the machine.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> Message-Id: <20221103170150.20789-3-pmorel@linux.ibm.com> [thuth: Small fixes to the commit description] Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
1fd396e3 | 03-Nov-2022 |
Pierre Morel <pmorel@linux.ibm.com> |
s390x: Register TYPE_S390_CCW_MACHINE properties as class properties
Currently, when running 'qemu-system-s390x -M s390-ccw-virtio,help' the s390x-specific properties are not listed anymore. This ha
s390x: Register TYPE_S390_CCW_MACHINE properties as class properties
Currently, when running 'qemu-system-s390x -M s390-ccw-virtio,help' the s390x-specific properties are not listed anymore. This happens because since commit d8fb7d0969 ("vl: switch -M parsing to keyval") the properties have to be defined at the class level and not at the instance level anymore. Fix it on s390x now, too, by moving the registration of the properties to the class level"
Fixes: d8fb7d0969 ("vl: switch -M parsing to keyval") Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> Message-Id: <20221103170150.20789-2-pmorel@linux.ibm.com> [thuth: Add patch description] Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
4a8d21ba | 28-Oct-2022 |
Matthew Rosato <mjrosato@linux.ibm.com> |
s390x/pci: RPCIT second pass when mappings exhausted
If we encounter a new mapping while the number of available DMA entries in vfio is 0, we are currently skipping that mapping which is a problem i
s390x/pci: RPCIT second pass when mappings exhausted
If we encounter a new mapping while the number of available DMA entries in vfio is 0, we are currently skipping that mapping which is a problem if we manage to free up DMA space after that within the same RPCIT -- we will return to the guest with CC0 and have not mapped everything within the specified range. This issue was uncovered while testing changes to the s390 linux kernel iommu/dma code, where a different usage pattern was employed (new mappings start at the end of the aperture and work back towards the front, making us far more likely to encounter new mappings before invalidated mappings during a global refresh).
Fix this by tracking whether any mappings were skipped due to vfio DMA limit hitting 0; when this occurs, we still continue the range and unmap/map anything we can - then we must re-run the range again to pickup anything that was missed. This must occur in a loop until all requests are satisfied (success) or we detect that we are still unable to complete all mappings (return ZPCI_RPCIT_ST_INSUFF_RES).
Link: https://lore.kernel.org/linux-s390/20221019144435.369902-1-schnelle@linux.ibm.com/ Fixes: 37fa32de70 ("s390x/pci: Honor DMA limits set by vfio") Reported-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Message-Id: <20221028194758.204007-2-mjrosato@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
38621181 | 12-Oct-2022 |
Nico Boehr <nrb@linux.ibm.com> |
s390x/tod-kvm: don't save/restore the TOD in PV guests
Under PV, the guest's TOD clock is under control of the ultravisor and the hypervisor cannot change it.
With upcoming kernel changes[1], the L
s390x/tod-kvm: don't save/restore the TOD in PV guests
Under PV, the guest's TOD clock is under control of the ultravisor and the hypervisor cannot change it.
With upcoming kernel changes[1], the Linux kernel will reject QEMU's request to adjust the guest's clock in this case, so don't attempt to set the clock.
This avoids the following warning message on save/restore of a PV guest:
warning: Unable to set KVM guest TOD clock: Operation not supported
[1] https://lore.kernel.org/all/20221011160712.928239-2-nrb@linux.ibm.com/
Fixes: c3347ed0d2ee ("s390x: protvirt: Support unpack facility") Signed-off-by: Nico Boehr <nrb@linux.ibm.com> Message-Id: <20221012123229.1196007-1-nrb@linux.ibm.com> [thuth: Add curly braces] Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
753ca06f | 17-Oct-2022 |
Janosch Frank <frankja@linux.ibm.com> |
s390x: Add KVM PV dump interface
Let's add a few bits of code which hide the new KVM PV dump API from us via new functions.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Janis S
s390x: Add KVM PV dump interface
Let's add a few bits of code which hide the new KVM PV dump API from us via new functions.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> [ Marc-André: fix up for compilation issue ] Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20221017083822.43118-10-frankja@linux.ibm.com>
show more ...
|
59d1ce44 | 02-Sep-2022 |
Matthew Rosato <mjrosato@linux.ibm.com> |
s390x/s390-virtio-ccw: add zpcii-disable machine property
The zpcii-disable machine property can be used to force-disable the use of zPCI interpretation facilities for a VM. By default, this settin
s390x/s390-virtio-ccw: add zpcii-disable machine property
The zpcii-disable machine property can be used to force-disable the use of zPCI interpretation facilities for a VM. By default, this setting will be off for machine 7.2 and newer.
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Message-Id: <20220902172737.170349-9-mjrosato@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Fix contextual conflict in ccw_machine_7_1_instance_options()] Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|