Public bug reported: These patches enable additional virtualization features on the Grace platform and are needed in the linux-nvidia 6.14-HWE.
The vEVENTQ and HW QUEUE features (and dependent patches) are upstream (as of v6.17-rc1): [PATCH v2 0/7] iommu: Add MSI mapping support with nested SMMU (Part-1 core) lore: https://lore.kernel.org/linux-iommu/[email protected]/ 1f7df3a69174 genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie 9349887e9300 genirq/msi: Refactor iommu_dma_compose_msi_msg() 288683c92b1a iommu: Make iommu_dma_prepare_msi() into a generic operation 96093fe54f48 irqchip: Have CONFIG_IRQ_MSI_IOMMU be selected by irqchips that need it 748706d7ca06 iommu: Turn fault_data to iommufd private pointer 40f5175d0eb7 iommufd: Implement sw_msi support natively [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT lore: https://lore.kernel.org/linux-iommu/[email protected]/ fb21b1568ada iommufd: Make attach_handle generic than fault specific dc10ba25d43f iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev() [PATCH v9 00/14] iommufd: Add vIOMMU infrastructure (Part-3: vEVENTQ) lore: https://lore.kernel.org/all/[email protected]/ dbf00d7d8912 iommufd/fault: Move two fault functions out of the header 927dabc9aa4d iommufd/fault: Add an iommufd_fault_init() helper 5426a78bebef iommufd: Abstract an iommufd_eventq from iommufd_fault 0507f337fc0c iommufd: Rename fault.c to eventq.c e36ba5ab808e iommufd: Add IOMMUFD_OBJ_VEVENTQ and IOMMUFD_CMD_VEVENTQ_ALLOC ea94b211c548 iommufd/viommu: Add iommufd_viommu_get_vdev_id helper e8e1ef9b77a7 iommufd/viommu: Add iommufd_viommu_report_event helper 941d0719aa66 iommufd/selftest: Require vdev_id when attaching to a nested domain b3cc0b7599cc iommufd/selftest: Add IOMMU_TEST_OP_TRIGGER_VEVENT for vEVENTQ coverage 97717a1f283f iommufd/selftest: Add IOMMU_VEVENTQ_ALLOC test coverage 2ec0458eb0e5 Documentation: userspace-api: iommufd: Update FAULT and VEVENTQ f0ea207ed781 iommu/arm-smmu-v3: Introduce struct arm_smmu_vmaster e7d3fa3d29d5 iommu/arm-smmu-v3: Report events that belong to devices attached to vIOMMU da0c56520e88 iommu/arm-smmu-v3: Set MEV bit in nested STE for DoS mitigations` 41464a4628f3 iommufd: Initialize the flags of vevent in iommufd_viommu_report_event() 6fc85bbbeaea iommufd: Balance veventq->num_events inc/dec [PATCH v5 0/3] iommu: Clean up cookie and sw_msi in struct iommu_domain lore: https://lore.kernel.org/all/[email protected]/ 6aa63a4ec947 iommu: Sort out domain user data ec031e1b35de iommufd: Move iommufd_sw_msi and related functions to driver.c 06d54f00f3f5 iommu: Drop sw_msi from iommu_domain [PATCH v11 00/18] iommufd support pasid attach/replace lore: https://lore.kernel.org/all/[email protected]/ ada14b9f1aab iommu: Require passing new handles to APIs supporting handle 8a9e1e773f60 iommu: Introduce a replace API for device pasid 03c9b102bea6 iommufd: Pass @pasid through the device attach/replace path bc06f7f66de4 iommufd/device: Only add reserved_iova in non-pasid path 2eaa7f845e14 iommufd/device: Replace idev->igroup with local variable ba1de6cd41d0 iommufd/device: Add helper to detect the first attach of a group 75f990aef38e iommufd/device: Wrap igroup->hwpt and igroup->device_list into attach struct 831b40f8416c iommufd/device: Replace device_list with device_array c0e301b2978d iommufd/device: Add pasid_attach array to track per-PASID attach ff3f014ebb1e iommufd: Enforce PASID-compatible domain in PASID path 2fb69c602d57 iommufd: Support pasid attach/replace 4c3f4f432c2d iommufd: Enforce PASID-compatible domain for RID ce15c13e7a14 iommu/vt-d: Add IOMMU_HWPT_ALLOC_PASID support dbc5f37b4f8a iommufd: Allow allocating PASID-compatible domain 9eb59204d519 iommufd/selftest: Add set_dev_pasid in mock iommu 068e14025158 iommufd/selftest: Add a helper to get test device c1b52b0a97ae iommufd/selftest: Add test ops to test pasid attach/detach d57a1fb34255 iommufd/selftest: Add coverage for iommufd pasid attach/detach [PATCH v9 0/5] vfio-pci support pasid attach/detach lore: https://lore.kernel.org/all/[email protected]/ 7fe6b987166b ida: Add ida_find_first_range() 290641346d0d vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices ad744ed5dd8b vfio: VFIO_DEVICE_[AT|DE]TACH_IOMMUFD_PT support pasid 803f97298e7d iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability 6d9500bb1ff8 iommufd/selftest: Add coverage for reporting max_pasid_log2 via IOMMU_HW_INFO [PATCH v9 00/29] iommufd: Add vIOMMU infrastructure (Part-4 HW QUEUE) lore: https://lore.kernel.org/all/[email protected]/ b23e09f99977 iommufd: Report unmapped bytes in the error path of iopt_unmap_iova_range fca02263f27e iommufd: Correct virt_id kdoc at struct iommu_vdevice_alloc c50a5de2c465 iommufd/viommu: Explicitly define vdev->virt_id 4b57c057f9e6 iommu: Use enum iommu_hw_info_type for type in hw_info op 3fcf56a2393b iommu: Add iommu_copy_struct_to_user helper c3436d42f812 iommu: Pass in a driver-level user data structure to viommu_init op 1976cdf61ce9 iommufd/viommu: Allow driver-specific user data for a vIOMMU object afeaf592c1d4 iommufd/selftest: Support user_data in mock_viommu_alloc 0e3e0b0c08e3 iommufd/selftest: Add coverage for viommu data 1c26c3bbdee1 iommufd/access: Add internal APIs for HW queue to use 27b77ea5feaa iommufd/access: Bypass access->ops->unmap for internal use ed42eee797ff iommufd/viommu: Add driver-defined vDEVICE support e2e936002258 iommufd/viommu: Introduce IOMMUFD_OBJ_HW_QUEUE and its related struct 2238ddc2b056 iommufd/viommu: Add IOMMUFD_CMD_HW_QUEUE_ALLOC ioctl 0b37d892d042 iommufd/driver: Add iommufd_hw_queue_depend/undepend() helpers 20896914da8a iommufd/selftest: Add coverage for IOMMUFD_CMD_HW_QUEUE_ALLOC 56e9a0d8e53f iommufd: Add mmap interface 80478a2b450e iommufd/selftest: Add coverage for the new mmap interface 035c9211f05b Documentation: userspace-api: iommufd: Update HW QUEUE 62622a8753fa iommu: Allow an input type in hw_info op a9f10bab2e50 iommufd: Allow an input data_type via iommu_hw_info 3a35f7d4a467 iommufd/selftest: Update hw_info coverage for an input data_type 61dd912ee02e iommu/arm-smmu-v3-iommufd: Add vsmmu_size/type and vsmmu_init impl ops 9eb6a666df7f iommu/arm-smmu-v3-iommufd: Add hw_info to impl_ops 1eb468744cca iommu/tegra241-cmdqv: Use request_threaded_irq 589899ee299e iommu/tegra241-cmdqv: Simplify deinit flow in tegra241_cmdqv_remove_vintf() 81f81db6328b iommu/tegra241-cmdqv: Do not statically map LVCMDQs 4dc0d12474f9 iommu/tegra241-cmdqv: Add user-space use support 32b2d3a57e26 iommu/tegra241-cmdqv: Add IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV support lore: https://patch.msgid.link/r/[email protected] 601b1d0d9395 iommu/tegra241-cmdqv: import IOMMUFD module namespace lore: https://lore.kernel.org/all/[email protected]/ 5510bd89da24 iommufd: Do not allow _iommufd_object_alloc_ucmd if abort op is set The vEGM patches (and dependent ECC patches) are not upstream and taken as SAUCE. All of these patches were tested applied over the linux-nvidia 6.14-HWE with this QEMU branch: https://github.com/nvmochs/QEMU/tree/smmuv3-accel-07212025_egm Example command: qemu-system-aarch64 \ -object iommufd,id=iommufd0 \ -machine hmat=on -machine virt,accel=kvm,gic-version=3,ras=on,highmem-mmio-size=4T \ -cpu host -smp cpus=4 -m size=16G,slots=2,maxmem=66G -nographic \ -object memory-backend-file,size=8G,id=m0,mem-path=/hugepages/,prealloc=on,share=off \ -object memory-backend-file,size=8G,id=m1,mem-path=/hugepages/,prealloc=on,share=off \ -numa node,memdev=m0,cpus=0-3,nodeid=0 -numa node,memdev=m1,nodeid=1 \ -numa node,nodeid=2 -numa node,nodeid=3 -numa node,nodeid=4 -numa node,nodeid=5\ -numa node,nodeid=6 -numa node,nodeid=7 -numa node,nodeid=8 -numa node,nodeid=9\ -device pxb-pcie,id=pcie.1,bus_nr=1,bus=pcie.0 -device arm-smmuv3,primary-bus=pcie.1,id=smmuv3.1,accel=on,cmdqv=on \ -device pcie-root-port,id=pcie.port1,bus=pcie.1,chassis=1,io-reserve=0 \ -device vfio-pci-nohotplug,host=0009:01:00.0,bus=pcie.port1,rombar=0,id=dev0,iommufd=iommufd0 \ -object acpi-generic-initiator,id=gi0,pci-dev=dev0,node=2 \ -object acpi-generic-initiator,id=gi1,pci-dev=dev0,node=3 \ -object acpi-generic-initiator,id=gi2,pci-dev=dev0,node=4 \ -object acpi-generic-initiator,id=gi3,pci-dev=dev0,node=5 \ -object acpi-generic-initiator,id=gi4,pci-dev=dev0,node=6 \ -object acpi-generic-initiator,id=gi5,pci-dev=dev0,node=7 \ -object acpi-generic-initiator,id=gi6,pci-dev=dev0,node=8 \ -object acpi-generic-initiator,id=gi7,pci-dev=dev0,node=9 \ -bios /usr/share/AAVMF/AAVMF_CODE.fd \ -device nvme,drive=nvme0,serial=deadbeaf1,bus=pcie.0 \ -drive file=guest.qcow2,index=0,media=disk,format=qcow2,if=none,id=nvme0 \ -device e1000,romfile=/usr/local/share/qemu/efi-e1000.rom,netdev=net0,bus=pcie.0 \ -netdev user,id=net0,hostfwd=tcp::5558-:22,hostfwd=tcp::5586-:5586 ** Affects: linux-nvidia (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-nvidia in Ubuntu. https://bugs.launchpad.net/bugs/2119656 Title: Backport support for Grace virtualization features: vEVENTQ, HW QUEUE, and vEGM Status in linux-nvidia package in Ubuntu: New Bug description: These patches enable additional virtualization features on the Grace platform and are needed in the linux-nvidia 6.14-HWE. The vEVENTQ and HW QUEUE features (and dependent patches) are upstream (as of v6.17-rc1): [PATCH v2 0/7] iommu: Add MSI mapping support with nested SMMU (Part-1 core) lore: https://lore.kernel.org/linux-iommu/[email protected]/ 1f7df3a69174 genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie 9349887e9300 genirq/msi: Refactor iommu_dma_compose_msi_msg() 288683c92b1a iommu: Make iommu_dma_prepare_msi() into a generic operation 96093fe54f48 irqchip: Have CONFIG_IRQ_MSI_IOMMU be selected by irqchips that need it 748706d7ca06 iommu: Turn fault_data to iommufd private pointer 40f5175d0eb7 iommufd: Implement sw_msi support natively [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT lore: https://lore.kernel.org/linux-iommu/[email protected]/ fb21b1568ada iommufd: Make attach_handle generic than fault specific dc10ba25d43f iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev() [PATCH v9 00/14] iommufd: Add vIOMMU infrastructure (Part-3: vEVENTQ) lore: https://lore.kernel.org/all/[email protected]/ dbf00d7d8912 iommufd/fault: Move two fault functions out of the header 927dabc9aa4d iommufd/fault: Add an iommufd_fault_init() helper 5426a78bebef iommufd: Abstract an iommufd_eventq from iommufd_fault 0507f337fc0c iommufd: Rename fault.c to eventq.c e36ba5ab808e iommufd: Add IOMMUFD_OBJ_VEVENTQ and IOMMUFD_CMD_VEVENTQ_ALLOC ea94b211c548 iommufd/viommu: Add iommufd_viommu_get_vdev_id helper e8e1ef9b77a7 iommufd/viommu: Add iommufd_viommu_report_event helper 941d0719aa66 iommufd/selftest: Require vdev_id when attaching to a nested domain b3cc0b7599cc iommufd/selftest: Add IOMMU_TEST_OP_TRIGGER_VEVENT for vEVENTQ coverage 97717a1f283f iommufd/selftest: Add IOMMU_VEVENTQ_ALLOC test coverage 2ec0458eb0e5 Documentation: userspace-api: iommufd: Update FAULT and VEVENTQ f0ea207ed781 iommu/arm-smmu-v3: Introduce struct arm_smmu_vmaster e7d3fa3d29d5 iommu/arm-smmu-v3: Report events that belong to devices attached to vIOMMU da0c56520e88 iommu/arm-smmu-v3: Set MEV bit in nested STE for DoS mitigations` 41464a4628f3 iommufd: Initialize the flags of vevent in iommufd_viommu_report_event() 6fc85bbbeaea iommufd: Balance veventq->num_events inc/dec [PATCH v5 0/3] iommu: Clean up cookie and sw_msi in struct iommu_domain lore: https://lore.kernel.org/all/[email protected]/ 6aa63a4ec947 iommu: Sort out domain user data ec031e1b35de iommufd: Move iommufd_sw_msi and related functions to driver.c 06d54f00f3f5 iommu: Drop sw_msi from iommu_domain [PATCH v11 00/18] iommufd support pasid attach/replace lore: https://lore.kernel.org/all/[email protected]/ ada14b9f1aab iommu: Require passing new handles to APIs supporting handle 8a9e1e773f60 iommu: Introduce a replace API for device pasid 03c9b102bea6 iommufd: Pass @pasid through the device attach/replace path bc06f7f66de4 iommufd/device: Only add reserved_iova in non-pasid path 2eaa7f845e14 iommufd/device: Replace idev->igroup with local variable ba1de6cd41d0 iommufd/device: Add helper to detect the first attach of a group 75f990aef38e iommufd/device: Wrap igroup->hwpt and igroup->device_list into attach struct 831b40f8416c iommufd/device: Replace device_list with device_array c0e301b2978d iommufd/device: Add pasid_attach array to track per-PASID attach ff3f014ebb1e iommufd: Enforce PASID-compatible domain in PASID path 2fb69c602d57 iommufd: Support pasid attach/replace 4c3f4f432c2d iommufd: Enforce PASID-compatible domain for RID ce15c13e7a14 iommu/vt-d: Add IOMMU_HWPT_ALLOC_PASID support dbc5f37b4f8a iommufd: Allow allocating PASID-compatible domain 9eb59204d519 iommufd/selftest: Add set_dev_pasid in mock iommu 068e14025158 iommufd/selftest: Add a helper to get test device c1b52b0a97ae iommufd/selftest: Add test ops to test pasid attach/detach d57a1fb34255 iommufd/selftest: Add coverage for iommufd pasid attach/detach [PATCH v9 0/5] vfio-pci support pasid attach/detach lore: https://lore.kernel.org/all/[email protected]/ 7fe6b987166b ida: Add ida_find_first_range() 290641346d0d vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices ad744ed5dd8b vfio: VFIO_DEVICE_[AT|DE]TACH_IOMMUFD_PT support pasid 803f97298e7d iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability 6d9500bb1ff8 iommufd/selftest: Add coverage for reporting max_pasid_log2 via IOMMU_HW_INFO [PATCH v9 00/29] iommufd: Add vIOMMU infrastructure (Part-4 HW QUEUE) lore: https://lore.kernel.org/all/[email protected]/ b23e09f99977 iommufd: Report unmapped bytes in the error path of iopt_unmap_iova_range fca02263f27e iommufd: Correct virt_id kdoc at struct iommu_vdevice_alloc c50a5de2c465 iommufd/viommu: Explicitly define vdev->virt_id 4b57c057f9e6 iommu: Use enum iommu_hw_info_type for type in hw_info op 3fcf56a2393b iommu: Add iommu_copy_struct_to_user helper c3436d42f812 iommu: Pass in a driver-level user data structure to viommu_init op 1976cdf61ce9 iommufd/viommu: Allow driver-specific user data for a vIOMMU object afeaf592c1d4 iommufd/selftest: Support user_data in mock_viommu_alloc 0e3e0b0c08e3 iommufd/selftest: Add coverage for viommu data 1c26c3bbdee1 iommufd/access: Add internal APIs for HW queue to use 27b77ea5feaa iommufd/access: Bypass access->ops->unmap for internal use ed42eee797ff iommufd/viommu: Add driver-defined vDEVICE support e2e936002258 iommufd/viommu: Introduce IOMMUFD_OBJ_HW_QUEUE and its related struct 2238ddc2b056 iommufd/viommu: Add IOMMUFD_CMD_HW_QUEUE_ALLOC ioctl 0b37d892d042 iommufd/driver: Add iommufd_hw_queue_depend/undepend() helpers 20896914da8a iommufd/selftest: Add coverage for IOMMUFD_CMD_HW_QUEUE_ALLOC 56e9a0d8e53f iommufd: Add mmap interface 80478a2b450e iommufd/selftest: Add coverage for the new mmap interface 035c9211f05b Documentation: userspace-api: iommufd: Update HW QUEUE 62622a8753fa iommu: Allow an input type in hw_info op a9f10bab2e50 iommufd: Allow an input data_type via iommu_hw_info 3a35f7d4a467 iommufd/selftest: Update hw_info coverage for an input data_type 61dd912ee02e iommu/arm-smmu-v3-iommufd: Add vsmmu_size/type and vsmmu_init impl ops 9eb6a666df7f iommu/arm-smmu-v3-iommufd: Add hw_info to impl_ops 1eb468744cca iommu/tegra241-cmdqv: Use request_threaded_irq 589899ee299e iommu/tegra241-cmdqv: Simplify deinit flow in tegra241_cmdqv_remove_vintf() 81f81db6328b iommu/tegra241-cmdqv: Do not statically map LVCMDQs 4dc0d12474f9 iommu/tegra241-cmdqv: Add user-space use support 32b2d3a57e26 iommu/tegra241-cmdqv: Add IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV support lore: https://patch.msgid.link/r/[email protected] 601b1d0d9395 iommu/tegra241-cmdqv: import IOMMUFD module namespace lore: https://lore.kernel.org/all/[email protected]/ 5510bd89da24 iommufd: Do not allow _iommufd_object_alloc_ucmd if abort op is set The vEGM patches (and dependent ECC patches) are not upstream and taken as SAUCE. All of these patches were tested applied over the linux-nvidia 6.14-HWE with this QEMU branch: https://github.com/nvmochs/QEMU/tree/smmuv3-accel-07212025_egm Example command: qemu-system-aarch64 \ -object iommufd,id=iommufd0 \ -machine hmat=on -machine virt,accel=kvm,gic-version=3,ras=on,highmem-mmio-size=4T \ -cpu host -smp cpus=4 -m size=16G,slots=2,maxmem=66G -nographic \ -object memory-backend-file,size=8G,id=m0,mem-path=/hugepages/,prealloc=on,share=off \ -object memory-backend-file,size=8G,id=m1,mem-path=/hugepages/,prealloc=on,share=off \ -numa node,memdev=m0,cpus=0-3,nodeid=0 -numa node,memdev=m1,nodeid=1 \ -numa node,nodeid=2 -numa node,nodeid=3 -numa node,nodeid=4 -numa node,nodeid=5\ -numa node,nodeid=6 -numa node,nodeid=7 -numa node,nodeid=8 -numa node,nodeid=9\ -device pxb-pcie,id=pcie.1,bus_nr=1,bus=pcie.0 -device arm-smmuv3,primary-bus=pcie.1,id=smmuv3.1,accel=on,cmdqv=on \ -device pcie-root-port,id=pcie.port1,bus=pcie.1,chassis=1,io-reserve=0 \ -device vfio-pci-nohotplug,host=0009:01:00.0,bus=pcie.port1,rombar=0,id=dev0,iommufd=iommufd0 \ -object acpi-generic-initiator,id=gi0,pci-dev=dev0,node=2 \ -object acpi-generic-initiator,id=gi1,pci-dev=dev0,node=3 \ -object acpi-generic-initiator,id=gi2,pci-dev=dev0,node=4 \ -object acpi-generic-initiator,id=gi3,pci-dev=dev0,node=5 \ -object acpi-generic-initiator,id=gi4,pci-dev=dev0,node=6 \ -object acpi-generic-initiator,id=gi5,pci-dev=dev0,node=7 \ -object acpi-generic-initiator,id=gi6,pci-dev=dev0,node=8 \ -object acpi-generic-initiator,id=gi7,pci-dev=dev0,node=9 \ -bios /usr/share/AAVMF/AAVMF_CODE.fd \ -device nvme,drive=nvme0,serial=deadbeaf1,bus=pcie.0 \ -drive file=guest.qcow2,index=0,media=disk,format=qcow2,if=none,id=nvme0 \ -device e1000,romfile=/usr/local/share/qemu/efi-e1000.rom,netdev=net0,bus=pcie.0 \ -netdev user,id=net0,hostfwd=tcp::5558-:22,hostfwd=tcp::5586-:5586 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia/+bug/2119656/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp

