lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <581569ce-b166-1cad-2624-66de319cc2b9@gmail.com>
Date:   Mon, 6 Dec 2021 22:19:21 +0800
From:   Tianyu Lan <ltykernel@...il.com>
To:     Juergen Gross <jgross@...e.com>, kys@...rosoft.com,
        haiyangz@...rosoft.com, sthemmin@...rosoft.com, wei.liu@...nel.org,
        decui@...rosoft.com, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
        hpa@...or.com, sstabellini@...nel.org, boris.ostrovsky@...cle.com,
        joro@...tes.org, will@...nel.org, davem@...emloft.net,
        kuba@...nel.org, jejb@...ux.ibm.com, martin.petersen@...cle.com,
        arnd@...db.de, hch@...radead.org, m.szyprowski@...sung.com,
        robin.murphy@....com, thomas.lendacky@....com,
        Tianyu.Lan@...rosoft.com, xen-devel@...ts.xenproject.org,
        michael.h.kelley@...rosoft.com
Cc:     iommu@...ts.linux-foundation.org, linux-arch@...r.kernel.org,
        linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-scsi@...r.kernel.org, netdev@...r.kernel.org,
        vkuznets@...hat.com, brijesh.singh@....com, konrad.wilk@...cle.com,
        hch@....de, parri.andrea@...il.com, dave.hansen@...el.com
Subject: Re: [PATCH V4 3/5] hyperv/IOMMU: Enable swiotlb bounce buffer for
 Isolation VM



On 12/5/2021 6:31 PM, Juergen Gross wrote:
> On 05.12.21 09:48, Tianyu Lan wrote:
>>
>>
>> On 12/5/2021 4:34 PM, Juergen Gross wrote:
>>> On 05.12.21 09:18, Tianyu Lan wrote:
>>>> From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
>>>>
>>>> hyperv 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 above shared_gpa_boundary
>>>> (E.G 39 bit address line) reported by Hyper-V CPUID ISOLATION_CONFIG.
>>>> The access physical address will be original physical address +
>>>> shared_gpa_boundary. The shared_gpa_boundary in the AMD SEV SNP
>>>> spec is called virtual top of memory(vTOM). Memory addresses below
>>>> vTOM are automatically treated as private while memory above
>>>> vTOM is treated as shared.
>>>>
>>>> Hyper-V initalizes swiotlb bounce buffer and default swiotlb
>>>> needs to be disabled. pci_swiotlb_detect_override() and
>>>> pci_swiotlb_detect_4gb() enable the default one. To override
>>>> the setting, hyperv_swiotlb_detect() needs to run before
>>>> these detect functions which depends on the pci_xen_swiotlb_
>>>> init(). Make pci_xen_swiotlb_init() depends on the hyperv_swiotlb
>>>> _detect() to keep the order.
>>>
>>> Why? Does Hyper-V plan to support Xen PV guests? If not, I don't see
>>> the need for adding this change.
>>>
>>
>> This is to keep detect function calling order that Hyper-V detect 
>> callback needs to call before pci_swiotlb_detect_override() and 
>> pci_swiotlb_detect_4gb(). This is the same for why
>> pci_swiotlb_detect_override() needs to depend on the 
>> pci_xen_swiotlb_detect(). Hyper-V also has such request and so make 
>> xen detect callback depends on Hyper-V one.
> 
> And does this even work without CONFIG_SWIOTLB_XEN, i.e. without
> pci_xen_swiotlb_detect() being in the system?
> 
Hi Juergen:
	Thanks for your review. This is a issue and I just sent out a v5 which 
decouples the dependency between xen and hyperv.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ