[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b102eb8e-c3b5-4d65-9113-3cc43e980b9b@linux.ibm.com>
Date: Tue, 26 Mar 2024 10:26:32 +0530
From: Shivaprasad G Bhat <sbhat@...ux.ibm.com>
To: Michael Ellerman <mpe@...erman.id.au>, tpearson@...torengineering.com,
alex.williamson@...hat.com, linuxppc-dev@...ts.ozlabs.org
Cc: npiggin@...il.com, christophe.leroy@...roup.eu, aneesh.kumar@...nel.org,
naveen.n.rao@...ux.ibm.com, gbatra@...ux.vnet.ibm.com,
brking@...ux.vnet.ibm.com, aik@...abs.ru, jgg@...pe.ca,
robh@...nel.org, linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
aik@....com, msuchanek@...e.de, jroedel@...e.de, vaibhav@...ux.ibm.com,
svaidy@...ux.ibm.com
Subject: Re: [RFC PATCH 3/3] pseries/iommu: Enable DDW for VFIO TCE create
Hi Michael,
On 3/13/24 18:23, Michael Ellerman wrote:
> Hi Shivaprasad,
>
> Shivaprasad G Bhat <sbhat@...ux.ibm.com> writes:
>> The commit 9d67c9433509 ("powerpc/iommu: Add \"borrowing\"
>> iommu_table_group_ops") implemented the "borrow" mechanism for
>> the pSeries SPAPR TCE. It did implement this support partially
>> that it left out creating the DDW if not present already.
>>
>> The patch here attempts to fix the missing gaps.
>> - Expose the DDW info to user by collecting it during probe.
>> - Create the window and the iommu table if not present during
>> VFIO_SPAPR_TCE_CREATE.
>> - Remove and recreate the window if the pageshift and window sizes
>> do not match.
>> - Restore the original window in enable_ddw() if the user had
>> created/modified the DDW. As there is preference for DIRECT mapping
>> on the host driver side, the user created window is removed.
>>
>> The changes work only for the non-SRIOV-VF scenarios for PEs having
>> 2 DMA windows.
> This crashes on powernv.
Thanks for pointing this out. I will take care of this in v2 of this RFC.
Regards,
Shivaprasad
Powered by blists - more mailing lists