Re: [RFC PATCH V3 09/11] HV/IOMMU: Enable swiotlb bounce buffer for Isolation VM

From
Tianyu Lan <hidden>
Date
2021-06-02 15:01:55
Also in
linux-arch, linux-iommu, linux-scsi, lkml, netdev, xen-devel
Reply to
Boris Ostrovsky, 2021-06-02
Hi Boris:
	Thanks for your review.

On 6/2/2021 9:16 AM, Boris Ostrovsky wrote:
On 5/30/21 11:06 AM, Tianyu Lan wrote:
quoted
@@ -91,6 +92,6 @@ int pci_xen_swiotlb_init_late(void)
  EXPORT_SYMBOL_GPL(pci_xen_swiotlb_init_late);
  
  IOMMU_INIT_FINISH(2,
-		  NULL,
+		  hyperv_swiotlb_detect,
  		  pci_xen_swiotlb_init,
  		  NULL);

Could you explain this change?
Hyper-V allocates its own swiotlb bounce buffer and the default
swiotlb buffer should not be allocated. swiotlb_init() in pci_swiotlb_init() is to allocate default swiotlb buffer.
To achieve this, put hyperv_swiotlb_detect() as the first entry in the iommu_table_entry list. The detect loop in the pci_iommu_alloc() will exit once hyperv_swiotlb_detect() is called in Hyper-V VM and other iommu_table_entry callback will not be called.
Thread (49 messages) 49 messages, 8 authors, last reply 2021-07-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help