hw/arm/smmuv3-accel: Use shared system address space#25
Open
mmhonap wants to merge 1 commit into
Open
Conversation
Collaborator
|
nit: In the commit message, Backoprt -> Backport Other than that, I think this looks good. |
Commit a509f10 reverted using get_msi_address_space() callback for MSI address space in kvm_arch_fixup_msi_route() and switched back to pci_device_iommu_address_space(). Previous commits ensures that if there is an IOMMU address space present it uses it will use msi_direct_gpa() directly to retrive the MSI GPA. However, in this unstable-10.1 branch, get_address_space() callback returns system "address_space_memory" for vfio-pci devices which will force kvm_arch_fixup_msi_route() to return early without actually retriveing the MSI GPA. The accel SMMMUv3 design has changed when we introduced msi_direct_gpa() and makes use of a shared_as_sysmem instead of address_space_memory. This will make sure that a proper MSI GPA will be returned in the above case. Please see upstream commit: 7d79312 ("hw/arm/smmuv3-accel: Initialize shared system address space"). Also, sharing a single system AddressSpace ensures that all devices behind accelerated SMMUv3s use the same system address space pointer. Hence, backport the shared_as_sysmem related changes. [Shameer: Backport based on upstream commit 7d79312] Fixes: a509f10 ("Revert hw/pci/pci: Introduce optional get_msi_address_space() callback") Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com> Signed-off-by: Manish Honap <mhonap@nvidia.com>
Author
|
Updated the commit message. |
|
This is fine with me. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit a509f10 reverted using get_msi_address_space() callback for MSI address space in kvm_arch_fixup_msi_route() and switched back to pci_device_iommu_address_space(). Previous commits ensures that if there is an IOMMU address space present it uses it will use msi_direct_gpa() directly to retrive the MSI GPA.
However, in this unstable-10.1 branch, get_address_space() callback returns system "address_space_memory" for vfio-pci devices which will force kvm_arch_fixup_msi_route() to return early without actually retriveing the MSI GPA.
The accel SMMMUv3 design has changed when we introduced msi_direct_gpa() and makes use of a shared_as_sysmem instead of address_space_memory. This will make sure that a proper MSI GPA will be returned in the above case. Please see upstream commit: 7d79312 ("hw/arm/smmuv3-accel: Initialize shared system address space").
Also, sharing a single system AddressSpace ensures that all devices behind accelerated SMMUv3s use the same system address space pointer.
Hence, backport the shared_as_sysmem related changes.
[Shameer: Backport based on upstream commit 7d79312]
Fixes: a509f10 ("Revert hw/pci/pci: Introduce optional get_msi_address_space() callback")