From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A618B10786 for ; Wed, 9 Nov 2022 19:10:27 +0000 (UTC) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A9GhW27030002; Wed, 9 Nov 2022 19:10:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=T/k3epjw4Qf8FbpJ6SymwJg2MM/DlmejbLOvCB2BWhk=; b=nEL7bm5e1wwEttZbvbIQalZPxpLALPT2eqSWdTw8cl8oqnFf+pGYCVzMladGWWMb4Qgx NAWLVMS5cH4pICSgJS0/jVwSpQK+jOWxU6HRjLUVEmXA/OuLktlUzW35BUaG00ooskQ3 cWFWTU4nVoOgdwys2pyTA1dtcX526h+eNZlEVpa69oA0BG448JBqbVhoSd1sz9ShxPmB Euevwe/g24G4FxfPd4Gy7Nlj/2lD/ARFpLk1SPld7VnKnNj7BDMWAzDVzcxvfkIfu3c5 UZwT2UqG6MaZW0jwYDdEjAuE2C7FTMYY488grJtv9cByni+MavoJBD6KF2T4srOcDdKB RA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3krfym3mr3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Nov 2022 19:10:01 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2A9IoWet029044; Wed, 9 Nov 2022 19:10:00 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3krfym3mqf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Nov 2022 19:10:00 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2A9J6E4e006536; Wed, 9 Nov 2022 19:09:59 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma01dal.us.ibm.com with ESMTP id 3kngsyfd8s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Nov 2022 19:09:59 +0000 Received: from smtpav05.dal12v.mail.ibm.com ([9.208.128.132]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2A9J9xjH58917126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 9 Nov 2022 19:09:59 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 775DD5804C; Wed, 9 Nov 2022 19:09:57 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4C3E358052; Wed, 9 Nov 2022 19:09:56 +0000 (GMT) Received: from [9.160.53.158] (unknown [9.160.53.158]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 9 Nov 2022 19:09:56 +0000 (GMT) Message-ID: <0869c784-14f2-9d7d-6cbb-d47ee713bbc1@linux.ibm.com> Date: Wed, 9 Nov 2022 14:09:55 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: S390 testing for IOMMUFD Content-Language: en-US From: Anthony Krowiak To: Christian Borntraeger , Jason Gunthorpe , Cornelia Huck , Eric Farman , Matthew Rosato , Niklas Schnelle , Halil Pasic , Jason Herne , linux-s390@vger.kernel.org Cc: iommu@lists.linux.dev, Kevin Tian , Alex Williamson , kvm@vger.kernel.org, Lu Baolu , Nicolin Chen References: <0-v4-0de2f6c78ed0+9d1-iommufd_jgg@nvidia.com> <73dd6b0e-35c7-bb5d-b392-a9de012d4f92@linux.ibm.com> In-Reply-To: <73dd6b0e-35c7-bb5d-b392-a9de012d4f92@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-GUID: QKRSSwBg2vaGArDz1D7dd19gEfxyQ74W X-Proofpoint-ORIG-GUID: n8KUgoBS1D1y3NEPKUDRJwXRSzwLASjY Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-09_06,2022-11-09_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 malwarescore=0 clxscore=1015 impostorscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211090144 On 11/9/22 9:49 AM, Anthony Krowiak wrote: > > On 11/8/22 9:04 AM, Anthony Krowiak wrote: >> >> On 11/8/22 5:12 AM, Christian Borntraeger wrote: >>> >>> >>> Am 08.11.22 um 02:09 schrieb Jason Gunthorpe: >>>> 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-next >>>> >>> >>>> >>>> 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. >>> >>> Gave it a quick spin with vfio_ap: >>> [  401.679199] vfio_ap_mdev b01a7c33-9696-48b2-9a98-050e8e17c69a: >>> Adding to iommu group 1 >>> [  402.085386] iommufd: IOMMUFD is providing /dev/vfio/vfio, not VFIO. >>> >>> Some tests seem to work, but others dont (running into timeouts). I >>> need to look >>> into that (or ideally Tony will have a look, FWIW >>> tests.test_vfio_ap.VfioAPAssignMdevToGuestTest >>> fails for me. >> >> >> I'm looking into it. > > > I cloned the > https://lore.kernel.org/kvm/Y2q3nFXwOk9jul5u@nvidia.com/T/#m76a9c609c5ccd1494c05c6f598f9c8e75b7c9888 > repo and ran the vfio_ap test cases. The tests ran without > encountering the errors related to the vfio_pin_pages() function, but > I did see two tests fail attempting to run crypto tests on the guest. > I also saw a WARN_ON stack trace in the dmesg output indicating a > timeout occurred trying to verify the completion of a queue reset. The > reset problem has reared its ugly head in our CI, so this may be a > good thing as it will allow me to debug why its happening. The problems I encountered were due to using a set of regression tests that were not vanilla. They contained some changes I made to try to improve performance of the tests. After restoring the vanilla regression tests, I was able to successfully execute the tests without any problems or errors with Jason's vfio_ap_(un)pin_pages patch installed, so that looks good to me. > > >> >> >>> >>> >>> The same kernel tree with defconfig (instead of >>> CONFIG_IOMMUFD_VFIO_CONTAINER=y) works fine. >>>> >>>> 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