-------- Forwarded Message --------
Subject: S390 testing for IOMMUFD
Date: Mon, 7 Nov 2022 21:09:02 -0400
From: Jason Gunthorpe <jgg(a)nvidia.com>
To: Cornelia Huck <cohuck(a)redhat.com>, Eric Farman
<farman(a)linux.ibm.com>, Matthew Rosato <mjrosato(a)linux.ibm.com>, Niklas
Schnelle <schnelle(a)linux.ibm.com>, Tony Krowiak
<akrowiak(a)linux.ibm.com>, Halil Pasic <pasic(a)linux.ibm.com>, Jason Herne
<jjherne(a)linux.ibm.com>, linux-s390(a)vger.kernel.org
CC: iommu(a)lists.linux.dev, Kevin Tian <kevin.tian(a)intel.com>, Alex
Williamson <alex.williamson(a)redhat.com>, kvm(a)vger.kernel.org, Lu Baolu
<baolu.lu(a)linux.intel.com>, Nicolin Chen <nicolinc(a)nvidia.com>
On Mon, Nov 07, 2022 at 08:48:53PM -0400, Jason Gunthorpe wrote:
> [
> This has been in linux-next for a little while now, and we've completed
> the syzkaller run. 1300 hours of CPU time have been invested since the
> last report with no improvement in coverage or new detections. syzkaller
> coverage reached 69%(75%), and review of the misses show substantial
> amounts are WARN_ON's and other debugging which are not expected to be
> covered.
> ]
>
> iommufd is the user API to control the IOMMU subsystem as it relates to
> managing IO page tables that point at user space memory.
[chop cc list]
s390 mdev maintainers,
Can I ask your help to test this with the two S390 mdev drivers? Now
that gvt is passing and we've covered alot of the QA ground it is a
good time to run it.
Take the branch from here:
https://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git/log/?h=for-…
And build the kernel with
CONFIG_VFIO_CONTAINER=n
CONFIG_IOMMUFD=y
CONFIG_IOMMUFD_VFIO_CONTAINER=y
And your existing stuff should work with iommufd providing the iommu
support to vfio. There will be a dmesg confirming this.
Let me know if there are any problems!
If I recall there was some desire from the S390 platform team to start
building on iommufd to create some vIOMMU acceleration for S390
guests, this is a necessary first step.
Thanks,
Jason
Update the current driver adaptation and usage method, from fixed
use of Hisilicon device driver to automatic registration of the
driver according to the algorithm.
When the algorithm API layer uses the driver, it is no longer
bound to the fixed device driver, but dynamically obtained
and stored according to the algorithm query to use.
Update the driver and API layer of the zip and sec module, keep the
function of the init interface unchanged, update the implementation
of the init2 interface and match the dynamic loading function.
Changes v5 -> v6:
- Rebase based on the patch of the zlib interface.
Changes v4 -> v5:
- Enhance the inclusiveness of the init2 interface.
Changes v3 -> v4:
- Remove the template instance code of cipher.
- Split the scheduler code into a separate patch.
Changes v2 -> v3:
- Add dynamic library file search function
- Fix some memory handling issues
Changes v1 -> v2:
- Fixed the compatibility method with the previous library file loading
Longfang Liu (5):
uadk: Add driver dynamic loading function
uadk: update scheduler for dynamic loading
uadk: improve the dynamic loading public framework
uadk: added ability to query supported algorithms
uadk/zip: Adapt the zip module to the dynamic loading framework
Makefile.am | 4 +-
drv/hisi_comp.c | 59 +++-
include/drv/wd_comp_drv.h | 27 --
include/wd.h | 12 +
include/wd_alg.h | 95 +++++++
include/wd_alg_common.h | 11 +
include/wd_sched.h | 6 +-
include/wd_util.h | 63 ++++-
libwd.map | 8 +
wd.c | 56 +++-
wd_alg.c | 265 ++++++++++++++++++
wd_comp.c | 243 +++++++++--------
wd_sched.c | 105 +++++++-
wd_util.c | 549 +++++++++++++++++++++++++++++++++++++-
14 files changed, 1337 insertions(+), 166 deletions(-)
create mode 100644 include/wd_alg.h
create mode 100644 wd_alg.c
--
2.33.0
In order to simplify the calling logic of uadk, a new init2 interface
is added to the cipher algorithm class, which includes hardware device
resource initialization and scheduler initialization.
Longfang Liu (2):
uadk/cipher: add the init2 interface for cipher
uadk/sec: adapt the sec module to the dynamic loading framework
drv/hisi_sec.c | 102 ++++++++++--
include/drv/wd_aead_drv.h | 2 +-
include/drv/wd_cipher_drv.h | 26 ---
include/drv/wd_digest_drv.h | 2 +-
include/wd_cipher.h | 29 ++++
libwd_crypto.map | 3 +
wd_cipher.c | 305 +++++++++++++++++++++++++++---------
7 files changed, 354 insertions(+), 115 deletions(-)
--
2.33.0
Update the current driver adaptation and usage method, from fixed
use of Hisilicon device driver to automatic registration of the
driver according to the algorithm.
When the algorithm API layer uses the driver, it is no longer
bound to the fixed device driver, but dynamically obtained
and stored according to the algorithm query to use.
Update the driver and API layer of the zip and sec module, keep the
function of the init interface unchanged, update the implementation
of the init2 interface and match the dynamic loading function.
Changes v4 -> v5:
- Enhance the inclusiveness of the init2 interface.
Changes v3 -> v4:
- Remove the template instance code of cipher.
- Split the scheduler code into a separate patch.
Changes v2 -> v3:
- Add dynamic library file search function
- Fix some memory handling issues
Changes v1 -> v2:
- Fixed the compatibility method with the previous library file loading
Longfang Liu (5):
uadk: Add driver dynamic loading function
uadk: update scheduler for dynamic loading
uadk: improve the dynamic loading public framework
uadk: added ability to query supported algorithms
uadk/zip: Adapt the zip module to the dynamic loading framework
Makefile.am | 4 +-
drv/hisi_comp.c | 59 +++-
include/drv/wd_comp_drv.h | 27 --
include/wd.h | 12 +
include/wd_alg.h | 95 +++++++
include/wd_alg_common.h | 11 +
include/wd_sched.h | 6 +-
include/wd_util.h | 63 ++++-
libwd.map | 8 +
wd.c | 56 +++-
wd_alg.c | 265 ++++++++++++++++++
wd_comp.c | 293 +++++++++++---------
wd_sched.c | 105 +++++++-
wd_util.c | 549 +++++++++++++++++++++++++++++++++++++-
14 files changed, 1374 insertions(+), 179 deletions(-)
create mode 100644 include/wd_alg.h
create mode 100644 wd_alg.c
--
2.33.0
------------------ Original ------------------
From: "Lorenzo Pieralisi" <lorenzo.pieralisi(a)linaro.org>gt;;
Date: Sat, Dec 17, 2022 00:14 AM
To: "Zhangfei Gao"<zhangfei.gao(a)linaro.org>gt;;
Cc: "Joyce Qi"<joyce.qi(a)linaro.org>gt;;"jean-philippe"<jean-philippe(a)linaro.org>gt;;"linaro-open-discussions"<linaro-open-discussions(a)op-lists.linaro.org>gt;;"linux"<linux(a)armlinux.org.uk>gt;;
Subject: Re: [Linaro-open-discussions] Re: Linaro-open-discussions Digest, Vol 25, Issue 3
On Thu, Oct 27, 2022 at 12:06:59PM +0800, Zhangfei Gao wrote:
> Hi, Lorenzo
>
> When we debug vsva, sva on guest with 2-stage translation,
> we found tlb miss impact performance a lot, with Jean's help.
>
> Currently we are using huge page feature in glibc to overcome this issue.
> With huge page, vsva in guest can achieve comparable performance as sva in
> host.
>
> More details: https://docs.qq.com/doc/DRXlpQmpTSlBZTGZZ
> Will do some
>
> Basically we are using two optimization methods/
> host sva: using memset fist to overcome io page fault, since cpu alloc
> physical memory is much faster than smmu.
> guest vsva: using huge page to overcome tlbmiss.
>
> The customer are asking whether (next version) silicon (smmu) can do some
> help to concur tlb miss issue or io page fault issue.
I can bring this up with the SMMU architect - thank you for taking
time to describe the use cases and SW you are deploying.
> If so, software can be simpler.
> Any suggestions?
Talking to SMMU architects - there is not much SW can do other than
what you are doing already.
Thanks,
Lorenzo
> Thanks
>
>
> On 2022/10/20 下午8:47, Joyce Qi via Linaro-open-discussions wrote:
> > Hi Jonathan,Lorenzo,all,
> >
> > Do we have any topic to sync on our LOD meeting next week?
> >
> > Thanks:)
> > Joyce
> >
> >
> >
>
Update the current driver adaptation and usage method, from fixed
use of Hisilicon device driver to automatic registration of the
driver according to the algorithm.
When the algorithm API layer uses the driver, it is no longer
bound to the fixed device driver, but dynamically obtained
and stored according to the algorithm query to use.
Update the driver and API layer of the zip and sec module, keep the
function of the init interface unchanged, update the implementation
of the init2 interface and match the dynamic loading function.
Changes v3 -> v4:
- Remove the template instance code of cipher.
- Split the scheduler code into a separate patch.
Changes v2 -> v3:
- Add dynamic library file search function
- Fix some memory handling issues
Changes v1 -> v2:
- Fixed the compatibility method with the previous library file loading
Longfang Liu (5):
uadk: Add driver dynamic loading function
uadk: update scheduler for dynamic loading
uadk: improve the dynamic loading public framework
uadk: added ability to query supported algorithms
uadk/zip: Adapt the zip module to the dynamic loading framework
Makefile.am | 4 +-
drv/hisi_comp.c | 59 +++-
include/drv/wd_comp_drv.h | 27 --
include/wd.h | 12 +
include/wd_alg.h | 95 +++++++
include/wd_alg_common.h | 11 +
include/wd_sched.h | 6 +-
include/wd_util.h | 63 ++++-
libwd.map | 8 +
wd.c | 56 +++-
wd_alg.c | 265 ++++++++++++++++++
wd_comp.c | 293 +++++++++++---------
wd_sched.c | 181 ++++++++++++-
wd_util.c | 547 +++++++++++++++++++++++++++++++++++++-
14 files changed, 1448 insertions(+), 179 deletions(-)
create mode 100644 include/wd_alg.h
create mode 100644 wd_alg.c
--
2.33.0
Update the current driver adaptation and usage method, from fixed
use of Hisilicon device driver to automatic registration of the
driver according to the algorithm.
When the algorithm API layer uses the driver, it is no longer
bound to the fixed device driver, but dynamically obtained
and stored according to the algorithm query to use.
Update the driver and API layer of the zip and sec module, keep the
function of the init interface unchanged, update the implementation
of the init2 interface and match the dynamic loading function.
Changes v3 -> v4:
- Remove the template instance code of cipher.
- Split the scheduler code into a separate patch.
Changes v2 -> v3:
- Add dynamic library file search function
- Fix some memory handling issues
Changes v1 -> v2:
- Fixed the compatibility method with the previous library file loading
Longfang Liu (5):
uadk: Add driver dynamic loading function
uadk: update scheduler for dynamic loading
uadk: improve the dynamic loading public framework
uadk: added ability to query supported algorithms
uadk/zip: Adapt the zip module to the dynamic loading framework
Makefile.am | 4 +-
drv/hisi_comp.c | 59 +++-
include/drv/wd_comp_drv.h | 27 --
include/wd.h | 12 +
include/wd_alg.h | 95 +++++++
include/wd_alg_common.h | 11 +
include/wd_sched.h | 6 +-
include/wd_util.h | 63 ++++-
libwd.map | 8 +
wd.c | 56 +++-
wd_alg.c | 265 ++++++++++++++++++
wd_comp.c | 293 +++++++++++---------
wd_sched.c | 105 +++++++-
wd_util.c | 547 +++++++++++++++++++++++++++++++++++++-
14 files changed, 1372 insertions(+), 179 deletions(-)
create mode 100644 include/wd_alg.h
create mode 100644 wd_alg.c
--
2.33.0
Update the current driver adaptation and usage method, from fixed
use of Hisilicon device driver to automatic registration of the
driver according to the algorithm.
When the algorithm API layer uses the driver, it is no longer
bound to the fixed device driver, but dynamically obtained
and stored according to the algorithm query to use.
Update the driver and API layer of the zip and sec module, keep the
function of the init interface unchanged, update the implementation
of the init2 interface and match the dynamic loading function.
Changes v3 -> v4:
- Remove the template instance code of cipher.
- Split the scheduler code into a separate patch.
Changes v2 -> v3:
- Add dynamic library file search function
- Fix some memory handling issues
Changes v1 -> v2:
- Fixed the compatibility method with the previous library file loading
Longfang Liu (5):
uadk: Add driver dynamic loading function
uadk: update scheduler for dynamic loading
uadk: improve the dynamic loading public framework
uadk: added ability to query supported algorithms
uadk/zip: Adapt the zip module to the dynamic loading framework
Makefile.am | 4 +-
drv/hisi_comp.c | 59 +++-
include/drv/wd_comp_drv.h | 27 --
include/wd.h | 12 +
include/wd_alg.h | 95 +++++++
include/wd_alg_common.h | 11 +
include/wd_sched.h | 6 +-
include/wd_util.h | 63 ++++-
libwd.map | 8 +
wd.c | 56 +++-
wd_alg.c | 265 ++++++++++++++++++
wd_comp.c | 293 +++++++++++---------
wd_sched.c | 181 ++++++++++++-
wd_util.c | 547 +++++++++++++++++++++++++++++++++++++-
14 files changed, 1448 insertions(+), 179 deletions(-)
create mode 100644 include/wd_alg.h
create mode 100644 wd_alg.c
--
2.33.0