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

2021-06-07 Thread Christoph Hellwig
Honestly, we really need to do away with the concept of hypervisor- specific swiotlb allocations and just add a hypervisor hook to remap the "main" buffer. That should remove a lot of code and confusion not just for Xen but also any future addition like hyperv.

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

2021-06-03 Thread Boris Ostrovsky
On 6/3/21 11:37 AM, Tianyu Lan wrote: > > Yes, the dependency is between hyperv_swiotlb_detect() and > pci_swiotlb_detect_override()/pci_swiotlb_detect_4gb(). Now > pci_swiotlb_detect_override() and pci_swiotlb_detect_4gb() depends on > pci_xen_swiotlb_detect(). To keep dependency between >

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

2021-06-03 Thread Tianyu Lan
On 6/3/2021 12:02 AM, Boris Ostrovsky wrote: On 6/2/21 11:01 AM, Tianyu Lan wrote: 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: @@ -91,6 +92,6 @@ int pci_xen_swiotlb_init_late(void)  

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

2021-06-02 Thread Boris Ostrovsky
On 6/2/21 11:01 AM, Tianyu Lan wrote: > 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: >>> @@ -91,6 +92,6 @@ int pci_xen_swiotlb_init_late(void) >>>   EXPORT_SYMBOL_GPL(pci_xen_swiotlb_init_late); >>>    

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

2021-06-02 Thread Tianyu Lan
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: @@ -91,6 +92,6 @@ int pci_xen_swiotlb_init_late(void) EXPORT_SYMBOL_GPL(pci_xen_swiotlb_init_late); IOMMU_INIT_FINISH(2, - NULL, +

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

2021-06-01 Thread Boris Ostrovsky
On 5/30/21 11:06 AM, Tianyu Lan wrote: > @@ -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, >

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

2021-05-30 Thread Tianyu Lan
From: Tianyu Lan Hyper-V Isolation VM requires bounce buffer support to copy data from/to encrypted memory and so enable swiotlb force mode to use swiotlb bounce buffer for DMA transaction. In Isolation VM with AMD SEV, the bounce buffer needs to be accessed via extra address space which is