From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1BDA3C433F5 for ; Tue, 17 May 2022 20:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5SJcfvwfRrTmDiFZ6t+KzXzUZjhWDiNRuM37HFoT1Hk=; b=zgy/gFaEuuS2u9 hzv3iUk0aNtVHWiB7a2WL0RB4Q7P2XimGRhnCdfsvOa6hublx5y1EKVBgbGPVjo4U3s45kdEOnKbd xOzmAu84KxaCCxasqMhpNwsZ5Z86Iv6vL5egH4x/JQCjpeyDm0uqdXxL9uk5frlQFYYWUbET02i/C ZekYShMSstcVe9Bervg5gAzlsWlEKB8UO6IsxA2Wmrnt1RdE3YsPMEcR61Eba3fICLxNnEfB9RF4r oJYIqH/8/YNijeGyA2rf7ODMGJHLS8GuAX0GfQv6VW2Cg94lg3sPXZA0Q81Kfrdr6gZihY03QJtni jhx8DmbAU/mLQj83CHEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nr3mc-00FjoV-Q3; Tue, 17 May 2022 20:27:06 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nr3mZ-00Fjmy-NG for linux-arm-kernel@lists.infradead.org; Tue, 17 May 2022 20:27:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652819221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RX9upDrgl+JlhubOZECKMiNUlSGALkg7zYaH+YeMTbs=; b=azQNIK+azywAg00boRt0qruoX7s2s07b46i1VIZJ48AiKn5xma/Zm0VQDghPnb/T29v5+S UfZEiwItpb1bc2/EC/YbOAI3iSfaOzzoldxYKtPi7ThO8K0sgaxwW1MuSB/eDarvYzK1i/ EBmngRbrkDwV1N3ucw1aJL952Bx3jdo= Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-7-MDaECmtWNgCTj8McWVD-Zw-1; Tue, 17 May 2022 16:27:00 -0400 X-MC-Unique: MDaECmtWNgCTj8McWVD-Zw-1 Received: by mail-il1-f199.google.com with SMTP id h13-20020a056e021b8d00b002d128cb1b7dso73975ili.19 for ; Tue, 17 May 2022 13:26:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=RX9upDrgl+JlhubOZECKMiNUlSGALkg7zYaH+YeMTbs=; b=RJ8joh115mAlJUbbUEV9BSJiKVyPJIh7uuhMvzNP9g0nU5oho0+WjYvmoyOwtIkFGH vx7BJ0V/Xz+PNIEMzt+7rkJAuZNiebztK9cJg7c+wBX/BBEmep6kthrUvIof9CIhSf0i +zgYKpNx5uh1K5srVWvj97p2EWgiky8786yTDBHIlV8GeSL4MDe273on/qZLNpG4m3NG kOOUmjnyllIeGcb+qilY7X0dVQnrcGQowy5ORAr8V970emxSRVZflm62Rdhys4f9jj9b P4E0eN15ZwH7JWaieYJYmuR/TvURRgetC1WSjmHZKlCg9R2/eSHypgjrTeFFMEAaKYKy +oJQ== X-Gm-Message-State: AOAM531KP3qUB4co8zR9LIRhNhs3dLJCs0CJjw0NLy5v4ZDc3WgMA236 BTuwKzVZajUGvuvJmc5oDD0OYyU9P5Yx5iMtbB1Y7sBP+PHGKGBLRsiTGdVha4H92gBJGnXkxbH iweIhN+j6T4FLuuORNE5hPBbsk5QsczPp0Wo= X-Received: by 2002:a92:cac4:0:b0:2c8:1095:b352 with SMTP id m4-20020a92cac4000000b002c81095b352mr11988152ilq.103.1652819218956; Tue, 17 May 2022 13:26:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeEI0mf6y/nWlK0I2cVK0c81aFILPDB/atAD9zcPbSBdqjQTCdzs8m0yRuQ4ofsMRcU9qzYw== X-Received: by 2002:a92:cac4:0:b0:2c8:1095:b352 with SMTP id m4-20020a92cac4000000b002c81095b352mr11988133ilq.103.1652819218343; Tue, 17 May 2022 13:26:58 -0700 (PDT) Received: from redhat.com ([38.15.36.239]) by smtp.gmail.com with ESMTPSA id j12-20020a02cc6c000000b0032e0720e2ffsm19301jaq.86.2022.05.17.13.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 13:26:57 -0700 (PDT) Date: Tue, 17 May 2022 14:26:56 -0600 From: Alex Williamson To: Jason Gunthorpe Cc: Cornelia Huck , iommu@lists.linux-foundation.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Robin Murphy , Joerg Roedel , Nicolin Chen , Will Deacon , Eric Auger Subject: Re: [PATCH] vfio: Remove VFIO_TYPE1_NESTING_IOMMU Message-ID: <20220517142656.140deb10.alex.williamson@redhat.com> In-Reply-To: <0-v1-0093c9b0e345+19-vfio_no_nesting_jgg@nvidia.com> References: <0-v1-0093c9b0e345+19-vfio_no_nesting_jgg@nvidia.com> Organization: Red Hat MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=alex.williamson@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220517_132703_886075_ABE83916 X-CRM114-Status: GOOD ( 23.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 10 May 2022 13:55:24 -0300 Jason Gunthorpe wrote: > This control causes the ARM SMMU drivers to choose a stage 2 > implementation for the IO pagetable (vs the stage 1 usual default), > however this choice has no visible impact to the VFIO user. Further qemu > never implemented this and no other userspace user is known. > > The original description in commit f5c9ecebaf2a ("vfio/iommu_type1: add > new VFIO_TYPE1_NESTING_IOMMU IOMMU type") suggested this was to "provide > SMMU translation services to the guest operating system" however the rest > of the API to set the guest table pointer for the stage 1 was never > completed, or at least never upstreamed, rendering this part useless dead > code. > > Since the current patches to enable nested translation, aka userspace page > tables, rely on iommufd and will not use the enable_nesting() > iommu_domain_op, remove this infrastructure. However, don't cut too deep > into the SMMU drivers for now expecting the iommufd work to pick it up - > we still need to create S2 IO page tables. > > Remove VFIO_TYPE1_NESTING_IOMMU and everything under it including the > enable_nesting iommu_domain_op. > > Just in-case there is some userspace using this continue to treat > requesting it as a NOP, but do not advertise support any more. > > Signed-off-by: Jason Gunthorpe > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 ---------------- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 16 ---------------- > drivers/iommu/iommu.c | 10 ---------- > drivers/vfio/vfio_iommu_type1.c | 12 +----------- > include/linux/iommu.h | 3 --- > include/uapi/linux/vfio.h | 2 +- > 6 files changed, 2 insertions(+), 57 deletions(-) > > It would probably make sense for this to go through the VFIO tree with Robin's > ack for the SMMU changes. I'd be in favor of applying this, but it seems Robin and Eric are looking for a stay of execution and I'd also be looking for an ack from Joerg. Thanks, Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel