Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: a9403bfcd93025df7b1924d0cf34fbc408955b33
https://github.com/qemu/qemu/commit/a9403bfcd93025df7b1924d0cf34fbc408955b33
Author: Huaitong Han <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M hw/pci/pci.c
M hw/virtio/virtio-pci.c
M include/hw/pci/pci.h
Log Message:
-----------
vhost: Don't set vring call if guest notifier is unused
The vring call fd is set even when the guest does not use MSI-X (e.g., in the
case of virtio PMD), leading to unnecessary CPU overhead for processing
interrupts.
The commit 96a3d98d2c("vhost: don't set vring call if no vector") optimized the
case where MSI-X is enabled but the queue vector is unset. However, there's an
additional case where the guest uses INTx and the INTx_DISABLED bit in the PCI
config is set, meaning that no interrupt notifier will actually be used.
In such cases, the vring call fd should also be cleared to avoid redundant
interrupt handling.
Fixes: 96a3d98d2c("vhost: don't set vring call if no vector")
Reported-by: Zhiyuan Yuan <[email protected]>
Signed-off-by: Jidong Xia <[email protected]>
Signed-off-by: Huaitong Han <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: 55cf1d4f10160e37440d9e727a160ac1141bbb53
https://github.com/qemu/qemu/commit/55cf1d4f10160e37440d9e727a160ac1141bbb53
Author: Eugenio Pérez <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M net/vhost-vdpa.c
Log Message:
-----------
vdpa: check for iova tree initialized at net_client_start
To map the guest memory while it is migrating we need to create the
iova_tree, as long as the destination uses x-svq=on. Checking to not
override it.
The function vhost_vdpa_net_client_stop clear it if the device is
stopped. If the guest starts the device again, the iova tree is
recreated by vhost_vdpa_net_data_start_first or vhost_vdpa_net_cvq_start
if needed, so old behavior is kept.
Tested-by: Lei Yang <[email protected]>
Reviewed-by: Si-Wei Liu <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Eugenio Pérez <[email protected]>
Signed-off-by: Jonah Palmer <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: 3312e6c8c9aa8f32019f14c74d209db17b9306eb
https://github.com/qemu/qemu/commit/3312e6c8c9aa8f32019f14c74d209db17b9306eb
Author: Eugenio Pérez <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M hw/virtio/vhost-vdpa.c
Log Message:
-----------
vdpa: reorder vhost_vdpa_set_backend_cap
It will be used directly by vhost_vdpa_init.
Tested-by: Lei Yang <[email protected]>
Reviewed-by: Si-Wei Liu <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Eugenio Pérez <[email protected]>
Signed-off-by: Jonah Palmer <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: 32f0c7ce4c948b2e275dca3cf7fa2a00677b9c1d
https://github.com/qemu/qemu/commit/32f0c7ce4c948b2e275dca3cf7fa2a00677b9c1d
Author: Eugenio Pérez <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M hw/virtio/vhost-vdpa.c
Log Message:
-----------
vdpa: set backend capabilities at vhost_vdpa_init
The backend does not reset them until the vdpa file descriptor is closed
so there is no harm in doing it only once.
This allows the destination of a live migration to premap memory in
batches, using VHOST_BACKEND_F_IOTLB_BATCH.
Tested-by: Lei Yang <[email protected]>
Reviewed-by: Si-Wei Liu <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Eugenio Pérez <[email protected]>
Signed-off-by: Jonah Palmer <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: be2e5fbefa7c1f8243bf6db2486b950b1ab19b72
https://github.com/qemu/qemu/commit/be2e5fbefa7c1f8243bf6db2486b950b1ab19b72
Author: Eugenio Pérez <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M hw/virtio/vhost-vdpa.c
M include/hw/virtio/vhost-vdpa.h
Log Message:
-----------
vdpa: add listener_registered
Check if the listener has been registered or not, so it needs to be
registered again at start.
Tested-by: Lei Yang <[email protected]>
Reviewed-by: Si-Wei Liu <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Eugenio Pérez <[email protected]>
Signed-off-by: Jonah Palmer <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: 9344dcbd004f951155c020d01c1bdc881e0451c1
https://github.com/qemu/qemu/commit/9344dcbd004f951155c020d01c1bdc881e0451c1
Author: Eugenio Pérez <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M hw/virtio/vhost-vdpa.c
Log Message:
-----------
vdpa: reorder listener assignment
Since commit f6fe3e333f ("vdpa: move memory listener to
vhost_vdpa_shared") this piece of code repeatedly assign
shared->listener members. This was not a problem as it was not used
until device start.
However next patches move the listener registration to this
vhost_vdpa_init function. When the listener is registered it is added
to an embedded linked list, so setting its members again will cause
memory corruption to the linked list node.
Do the right thing and only set it in the first vdpa device.
Tested-by: Lei Yang <[email protected]>
Reviewed-by: Si-Wei Liu <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Eugenio Pérez <[email protected]>
Signed-off-by: Jonah Palmer <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: a400720365ea86602044b78dd8654911d0fe3977
https://github.com/qemu/qemu/commit/a400720365ea86602044b78dd8654911d0fe3977
Author: Eugenio Pérez <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M include/hw/virtio/vhost-vdpa.h
M net/vhost-vdpa.c
Log Message:
-----------
vdpa: move iova_tree allocation to net_vhost_vdpa_init
As we are moving to keep the mapping through all the vdpa device life
instead of resetting it at VirtIO reset, we need to move all its
dependencies to the initialization too. In particular devices with
x-svq=on need a valid iova_tree from the beginning.
Simplify the code also consolidating the two creation points: the first
data vq in case of SVQ active and CVQ start in case only CVQ uses it.
Tested-by: Lei Yang <[email protected]>
Reviewed-by: Si-Wei Liu <[email protected]>
Acked-by: Jason Wang <[email protected]>
Suggested-by: Si-Wei Liu <[email protected]>
Signed-off-by: Eugenio Pérez <[email protected]>
Signed-off-by: Jonah Palmer <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: 494c50dcc0995ae6eb526d2848c33cbf910ab218
https://github.com/qemu/qemu/commit/494c50dcc0995ae6eb526d2848c33cbf910ab218
Author: Eugenio Pérez <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M hw/virtio/vhost-vdpa.c
Log Message:
-----------
vdpa: move memory listener register to vhost_vdpa_init
Current memory operations like pinning may take a lot of time at the
destination. Currently they are done after the source of the migration is
stopped, and before the workload is resumed at the destination. This is a
period where neigher traffic can flow, nor the VM workload can continue
(downtime).
We can do better as we know the memory layout of the guest RAM at the
destination from the moment that all devices are initializaed. So
moving that operation allows QEMU to communicate the kernel the maps
while the workload is still running in the source, so Linux can start
mapping them.
As a small drawback, there is a time in the initialization where QEMU
cannot respond to QMP etc. By some testing, this time is about
0.2seconds. This may be further reduced (or increased) depending on the
vdpa driver and the platform hardware, and it is dominated by the cost
of memory pinning.
This matches the time that we move out of the called downtime window.
The downtime is measured as the elapsed trace time between the last
vhost_vdpa_suspend on the source and the last vhost_vdpa_set_vring_enable_one
on the destination. In other words, from "guest CPUs freeze" to the
instant the final Rx/Tx queue-pair is able to start moving data.
Using ConnectX-6 Dx (MLX5) NICs in vhost-vDPA mode with 8 queue-pairs,
the series reduces guest-visible downtime during back-to-back live
migrations by more than half:
- 39G VM: 4.72s -> 2.09s (-2.63s, ~56% improvement)
- 128G VM: 14.72s -> 5.83s (-8.89s, ~60% improvement)
Tested-by: Lei Yang <[email protected]>
Reviewed-by: Si-Wei Liu <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Eugenio Pérez <[email protected]>
Signed-off-by: Jonah Palmer <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: 0b006153b7ec66505cb2d231235aa19ca5d2ce37
https://github.com/qemu/qemu/commit/0b006153b7ec66505cb2d231235aa19ca5d2ce37
Author: Bernhard Beschow <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M hw/i386/pc_piix.c
Log Message:
-----------
hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
Commit 56b1f50e3c10 ("hw/i386/pc: Wire RTC ISA IRQs in south bridges")
attempted to refactor RTC IRQ wiring which was previously done in
pc_basic_device_init() but forgot about the isapc machine. Fix this by
wiring in the code section dedicated exclusively to the isapc machine.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2961
Fixes: 56b1f50e3c10 ("hw/i386/pc: Wire RTC ISA IRQs in south bridges")
cc: qemu-stable
Signed-off-by: Bernhard Beschow <[email protected]>
Reviewed-by: Mark Cave-Ayland <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Commit: 6322b753f798337835e205b6d805356bea582c86
https://github.com/qemu/qemu/commit/6322b753f798337835e205b6d805356bea582c86
Author: Stefan Hajnoczi <[email protected]>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M hw/i386/amd_iommu.c
M hw/i386/pc_piix.c
M hw/pci/pci.c
M hw/pci/pcie.c
M hw/virtio/vhost-vdpa.c
M hw/virtio/virtio-pci.c
M hw/virtio/virtio.c
M include/hw/pci/pci.h
M include/hw/pci/pci_device.h
M include/hw/pci/pcie.h
M include/hw/pci/pcie_regs.h
M include/hw/virtio/vhost-vdpa.h
M include/system/memory.h
M net/vhost-vdpa.c
A tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
M tests/qtest/bios-tables-test.c
M tests/uefi-test-tools/Makefile
M tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc
M tests/uefi-test-tools/uefi-test-build.config
Log Message:
-----------
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu
into staging
virtio,pci,pc: features, fixes, tests
vhost will now no longer set a call notifier if unused
some work towards loongarch testing based on bios-tables-test
some core pci work for SVM support in vtd
vhost vdpa init has been optimized for response time to QMP
A couple more fixes
Signed-off-by: Michael S. Tsirkin <[email protected]>
# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCgAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmg97ZUPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpRBsH/0Fx4NNMaynXmVOgV1rMFirTydhQG5NSdeJv
# i1RHd25Rne/RXH0CL71UPuOPADWh6bv9iZTg6RU6g7TwI8K9v3M0R71RlPLh1Lh1
# x7fifWNSNXVi18fM9/j+mIg7I2Ye0AaqveezRJWGzqoOxQKKlVI2xspKZBCCkygd
# i2tgtR1ORB6+ji6wVoTDPlL42X5Jef5MUT3XOcRR5biHm0JfqxxQKVM83mD+5yMI
# 0YqjT2BVRzo5rGN7mSuf7tQ50xI6I0wI1+eoWeKHRbg08f709M8TZRDKuVh24Evg
# 9WnIhKLTzRVdCNLNbw9h9EhxoANpWCyvmnn6GCfkJui40necFHY=
# =0lO6
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 02 Jun 2025 14:29:41 EDT
# gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg: issuer "[email protected]"
# gpg: Good signature from "Michael S. Tsirkin <[email protected]>" [full]
# gpg: aka "Michael S. Tsirkin <[email protected]>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (26
commits)
hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
vdpa: move memory listener register to vhost_vdpa_init
vdpa: move iova_tree allocation to net_vhost_vdpa_init
vdpa: reorder listener assignment
vdpa: add listener_registered
vdpa: set backend capabilities at vhost_vdpa_init
vdpa: reorder vhost_vdpa_set_backend_cap
vdpa: check for iova tree initialized at net_client_start
vhost: Don't set vring call if guest notifier is unused
tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
tests/data/uefi-boot-images: Add ISO image for LoongArch system
uefi-test-tools:: Add LoongArch64 support
pci: Add a PCI-level API for PRI
pci: Add a pci-level API for ATS
pci: Add a pci-level initialization function for IOMMU notifiers
memory: Store user data pointer in the IOMMU notifiers
pci: Add an API to get IOMMU's min page size and virtual address width
pci: Cache the bus mastering status in the device
pcie: Helper functions to check to check if PRI is enabled
pcie: Add a helper to declare the PRI capability for a pcie device
...
Signed-off-by: Stefan Hajnoczi <[email protected]>
Compare: https://github.com/qemu/qemu/compare/25de0b9aa129...6322b753f798
To unsubscribe from these emails, change your notification settings at
https://github.com/qemu/qemu/settings/notifications