Branch: refs/heads/staging Home: https://github.com/qemu/qemu Commit: a9403bfcd93025df7b1924d0cf34fbc408955b33 https://github.com/qemu/qemu/commit/a9403bfcd93025df7b1924d0cf34fbc408955b33 Author: Huaitong Han <han...@chinatelecom.cn> 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 <yuanzhiy...@chinatelecom.cn> Signed-off-by: Jidong Xia <xi...@chinatelecom.cn> Signed-off-by: Huaitong Han <han...@chinatelecom.cn> Message-Id: <20250522100548.212740-1-han...@chinatelecom.cn> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: 55cf1d4f10160e37440d9e727a160ac1141bbb53 https://github.com/qemu/qemu/commit/55cf1d4f10160e37440d9e727a160ac1141bbb53 Author: Eugenio Pérez <epere...@redhat.com> 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 <leiy...@redhat.com> Reviewed-by: Si-Wei Liu <si-wei....@oracle.com> Acked-by: Jason Wang <jasow...@redhat.com> Signed-off-by: Eugenio Pérez <epere...@redhat.com> Signed-off-by: Jonah Palmer <jonah.pal...@oracle.com> Message-Id: <20250522145839.59974-2-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: 3312e6c8c9aa8f32019f14c74d209db17b9306eb https://github.com/qemu/qemu/commit/3312e6c8c9aa8f32019f14c74d209db17b9306eb Author: Eugenio Pérez <epere...@redhat.com> 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 <leiy...@redhat.com> Reviewed-by: Si-Wei Liu <si-wei....@oracle.com> Acked-by: Jason Wang <jasow...@redhat.com> Signed-off-by: Eugenio Pérez <epere...@redhat.com> Signed-off-by: Jonah Palmer <jonah.pal...@oracle.com> Message-Id: <20250522145839.59974-3-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: 32f0c7ce4c948b2e275dca3cf7fa2a00677b9c1d https://github.com/qemu/qemu/commit/32f0c7ce4c948b2e275dca3cf7fa2a00677b9c1d Author: Eugenio Pérez <epere...@redhat.com> 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 <leiy...@redhat.com> Reviewed-by: Si-Wei Liu <si-wei....@oracle.com> Acked-by: Jason Wang <jasow...@redhat.com> Signed-off-by: Eugenio Pérez <epere...@redhat.com> Signed-off-by: Jonah Palmer <jonah.pal...@oracle.com> Message-Id: <20250522145839.59974-4-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: be2e5fbefa7c1f8243bf6db2486b950b1ab19b72 https://github.com/qemu/qemu/commit/be2e5fbefa7c1f8243bf6db2486b950b1ab19b72 Author: Eugenio Pérez <epere...@redhat.com> 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 <leiy...@redhat.com> Reviewed-by: Si-Wei Liu <si-wei....@oracle.com> Acked-by: Jason Wang <jasow...@redhat.com> Signed-off-by: Eugenio Pérez <epere...@redhat.com> Signed-off-by: Jonah Palmer <jonah.pal...@oracle.com> Message-Id: <20250522145839.59974-5-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: 9344dcbd004f951155c020d01c1bdc881e0451c1 https://github.com/qemu/qemu/commit/9344dcbd004f951155c020d01c1bdc881e0451c1 Author: Eugenio Pérez <epere...@redhat.com> 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 <leiy...@redhat.com> Reviewed-by: Si-Wei Liu <si-wei....@oracle.com> Acked-by: Jason Wang <jasow...@redhat.com> Signed-off-by: Eugenio Pérez <epere...@redhat.com> Signed-off-by: Jonah Palmer <jonah.pal...@oracle.com> Message-Id: <20250522145839.59974-6-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: a400720365ea86602044b78dd8654911d0fe3977 https://github.com/qemu/qemu/commit/a400720365ea86602044b78dd8654911d0fe3977 Author: Eugenio Pérez <epere...@redhat.com> 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 <leiy...@redhat.com> Reviewed-by: Si-Wei Liu <si-wei....@oracle.com> Acked-by: Jason Wang <jasow...@redhat.com> Suggested-by: Si-Wei Liu <si-wei....@oracle.com> Signed-off-by: Eugenio Pérez <epere...@redhat.com> Signed-off-by: Jonah Palmer <jonah.pal...@oracle.com> Message-Id: <20250522145839.59974-7-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: 494c50dcc0995ae6eb526d2848c33cbf910ab218 https://github.com/qemu/qemu/commit/494c50dcc0995ae6eb526d2848c33cbf910ab218 Author: Eugenio Pérez <epere...@redhat.com> 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 <leiy...@redhat.com> Reviewed-by: Si-Wei Liu <si-wei....@oracle.com> Acked-by: Jason Wang <jasow...@redhat.com> Signed-off-by: Eugenio Pérez <epere...@redhat.com> Signed-off-by: Jonah Palmer <jonah.pal...@oracle.com> Message-Id: <20250522145839.59974-8-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: 0b006153b7ec66505cb2d231235aa19ca5d2ce37 https://github.com/qemu/qemu/commit/0b006153b7ec66505cb2d231235aa19ca5d2ce37 Author: Bernhard Beschow <shen...@gmail.com> 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 <shen...@gmail.com> Reviewed-by: Mark Cave-Ayland <mark.caveayl...@nutanix.com> Message-Id: <20250526203820.1853-1-shen...@gmail.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Commit: 6322b753f798337835e205b6d805356bea582c86 https://github.com/qemu/qemu/commit/6322b753f798337835e205b6d805356bea582c86 Author: Stefan Hajnoczi <stefa...@redhat.com> 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 <m...@redhat.com> # -----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 "m...@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <m...@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <m...@redhat.com>" [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 <stefa...@redhat.com> 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