Centos-kernel-stream-9/drivers/hv
Lucas Zampieri 304e2a4e29 Merge: [RHEL-9.5.0] iommu and dma mapping api updates
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4151

# Merge Request Required Information

JIRA: https://issues.redhat.com/browse/RHEL-28780  
JIRA: https://issues.redhat.com/browse/RHEL-12083  
JIRA: https://issues.redhat.com/browse/RHEL-12322  
JIRA: https://issues.redhat.com/browse/RHEL-29105  
JIRA: https://issues.redhat.com/browse/RHEL-29357  
JIRA: https://issues.redhat.com/browse/RHEL-29359  

Omitted-fix: ed8b94f6e0ac ("powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add")  
     - Reverted by 1fba2bf8e9d5 ("Revert "powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add"")

Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  
Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git  
                 branch: next   
Tested: In progress  

	- general cki coverage  

	- Nvidia testing arm-smmu-v3 and iommufd related changes they have requested.  

	- Multiple rounds testing of amd_iommu, intel_iommu, and arm-smmu-v3 with  
	  various iommu configurations with disk i/o using fio,  
	  covering lazy iotlb invalidation, strict iotlb invalidation,  
	  and passthrough. Also tested with forcedac set. Intel  
	  Scalable Mode capable systems tested with the iotlb invalidation  
	  policies, and passthrough with scalable mode enabled, and disabled.  
	  AMD systems tested tested with v1 pages tables and v2.  

	- Tested booting with various iommu configurations, and verifying system  
	  in correct state on AMD, Intel, and ARM.  

	- Limited test on ppc64le. The system I had access to was  
	  setting up a 64-bit bypass window, and using dma_direct  
	  calls.  It ran, but since I don't normally touch ppc64le  
	  iommu code, I need to investigate more or get IBM assistance  
	  to more thoroughly test it.  

	- Working on getting testing assistance from IBM for the s390x changes.  

## Summary of Changes


This brings iommu, iommufd, and dma mapping api up to 6.9 with some additions from Joerg's  
next branch minus some commits changes in a 6.9 SEV-SNP pull for AMD. Some hightlights:  

- The removal of the amd_iommu_v2 code, and the addition of it's replacement based on the    
  iommu core SVA api, along with a re-org of the amd_iommu code.  
- The migration of s390 to the iommu core dma-iommu dma ops implementation, joining Intel,  
  AMD, and ARM as users of the same code base.  
- The beginnings of a re-work of the arm-smmu-v3 driver by Jason, and others.  
- A number of changes to iommufd as it continues to get fleshed out.  
- IOPT memory usage observability (code that was basis for talk at LPC last year)  

  Example output in vmstat files:  

```
    # grep iommu /sys/devices/system/node/node*/vmstat  
    /sys/devices/system/node/node0/vmstat:nr_iommu_pages 342  
    /sys/devices/system/node/node1/vmstat:nr_iommu_pages 0  
```

- Continued work on shared virtual addressing and io page faulting (PRI).  
- Dynamic swiotlb memory pools. This is not enabled yet, as they still seem to be  
  shaking out issues upstream, but the code is in place now.  
- Re-working of iommu core domain allocation.  

Note: iommufd selftest is being enabled in separate work that has been delegated to    
      another engineer starting to help with iommu. So that will be enabled in the  
      next few weeks to add more coverage for iommufd.  

Conflicts wise, they should be noted in the individual commits, but  
not too bad overall. 13/30 were dropping unsupported bits, and another  
8 were context diffs. A couple caused by out of order backports due  
to fixes, and couple upstream conflicts from colliding patchsets that  
had to be resolved in the merge commits.  

Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>

Approved-by: Jan Stancek <jstancek@redhat.com>
Approved-by: Donald Dutile <ddutile@redhat.com>
Approved-by: Phil Auld <pauld@redhat.com>
Approved-by: David Airlie <airlied@redhat.com>
Approved-by: Lenny Szubowicz <lszubowi@redhat.com>
Approved-by: Steve Best <sbest@redhat.com>
Approved-by: John W. Linville <linville@redhat.com>
Approved-by: Mark Langsdorf <mlangsdo@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
2024-06-05 20:03:50 +00:00
..
Kconfig
Makefile
channel.c
channel_mgmt.c
connection.c Drivers: hv: Change hv_free_hyperv_page() to take void * argument 2024-01-31 21:46:21 -05:00
hv.c hyperv-tlfs: Change prefix of generic HV_REGISTER_* MSRs to HV_MSR_* 2024-05-13 23:58:46 -04:00
hv_balloon.c hv_balloon: Update the balloon driver to use the SBRM API 2024-01-31 21:46:22 -05:00
hv_common.c Merge: [RHEL-9.5.0] iommu and dma mapping api updates 2024-06-05 20:03:50 +00:00
hv_debugfs.c
hv_fcopy.c
hv_kvp.c
hv_snapshot.c
hv_trace.c
hv_trace.h
hv_trace_balloon.h
hv_util.c
hv_utils_transport.c
hv_utils_transport.h
hyperv_vmbus.h
ring_buffer.c
vmbus_drv.c ACPI: make remove callback of ACPI driver void 2024-03-20 09:42:49 -04:00