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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC82AC433DB for ; Mon, 29 Mar 2021 23:25:39 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5FBF26196C for ; Mon, 29 Mar 2021 23:25:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FBF26196C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: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=U2Od/q4iY3NZDIO1KlW1W+GQP5VnDy56NHIxpO4RZbM=; b=GaR83vjdLIeUkTHYQYsKmhim3 kt5e1eD9takMfSMmd/GixG5kZIeF9Or/NQpt4OvqSBrEsPLEwvuv1+bkdJr7n4rfdCBzVldFHfHpy KjLdch9t21hnhL5crL236X9DHP2On2oa19pfqCj5Ze8ATpvkO1Z+bbzZOvlz7/gfiNSBD4hktRTql YebaN5Q00rGzqqaqHMMPAwNfvV4RP9RNpsf502+QjZsJQnPm9Xu9uXufdCyWGvxjlcl0cp3nL9kt/ Bp7t+miaNTgt8NanjOQH4191MLQSYgJGd4ephH9S7bxS1XhERUApwbTohKVeZ8GGniIuw1g4l2MXQ 9eA8A4cpQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR1EZ-001uCe-6S; Mon, 29 Mar 2021 23:23:47 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQuiN-000lJe-SP for linux-arm-kernel@lists.infradead.org; Mon, 29 Mar 2021 16:26:45 +0000 Received: by mail-wr1-x42b.google.com with SMTP id z2so13475616wrl.5 for ; Mon, 29 Mar 2021 09:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=T74W0nsf8Eu00PANoOWWFVGfSYum6qWwsn0Bw2THZ+s=; b=YUIEgiI1qQRI29mfubywR7B14Uyqk60nwvE2KF7gqROs2K/Or1NYVxhiZL1RMZ9LIb sxYMJOnaFcJ3QryDjmsfpUP4evW0yxJ3rw8eNH8PHzeO+fHHzIgI/Y0wybDi44c6cS0p QD0Yt7+edAu6/oJ0axLyyHLhGCJaiV+68wfh48hVfETIQjrodfMWWyd+Il3hV/R+JQ4o cyRYUBscybFXnPjsct6pzbq61epkXDbc8+yQhoNk/cjCgWp2QmhEqfFS91Bxoq0/v6At TaRW1iDGlxWbVJKNyQv0AhTpMf6zO8lTwMDtFHfw9Hf03gYJdaNK09LuH1HAz/RAPwuU eMaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=T74W0nsf8Eu00PANoOWWFVGfSYum6qWwsn0Bw2THZ+s=; b=jq+nux54DKmePnaOnOEcsHa2gepnnOuX7Lvd0QrTQv36M8TCiJdOjc0WnFnZKerGcQ xfhHe5BLWxcFeuixkLasQN0gENbnmuiCM8klgxJuu8bfHLFe4Z/pgYtQQXsg/yd+gyvt E1k2Q6x0bB9iFgPnSkQhlR/N/Y6Ztg3Zpbhf5kAXzYPPheDAUa8uYiPZCxv4dvfxxZwo 15e0WTHs9BFarfoJcKVxScosb9uHn3gCPZCBUtIZqBFY2ueYJMTWYWnEDSOqsw7c3i9f IyHjSdQZP69vMTj7C+shTw/oIqd+36F5cJkPGfdSy3NpcBJObyC6xdHaZgA8h5Q83/pM BqEQ== X-Gm-Message-State: AOAM532y3lHLPmNxeTlEo0Yo8EMndlP8ymDSCkyRCPHoJFWhH665AROH p66hvVG3nTyQ8sFIeXrPdMKcaQ== X-Google-Smtp-Source: ABdhPJyAv1xefDsH4RnBTD3wTIb5bRlvWKvplwmh2Mjf9I5mC7dc85r3sKdv9DNWLYwkDvTL7Er6sg== X-Received: by 2002:a05:6000:18d2:: with SMTP id w18mr29581974wrq.88.1617035167386; Mon, 29 Mar 2021 09:26:07 -0700 (PDT) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id m3sm30135465wme.40.2021.03.29.09.26.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 09:26:07 -0700 (PDT) Date: Mon, 29 Mar 2021 18:25:48 +0200 From: Jean-Philippe Brucker To: Vivek Kumar Gautam Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org, joro@8bytes.org, will.deacon@arm.com, mst@redhat.com, robin.murphy@arm.com, eric.auger@redhat.com, alex.williamson@redhat.com, kevin.tian@intel.com, jacob.jun.pan@linux.intel.com, yi.l.liu@intel.com, lorenzo.pieralisi@arm.com, shameerali.kolothum.thodi@huawei.com Subject: Re: [PATCH RFC v1 02/15] iommu: Add a simple PASID table library Message-ID: References: <20210115121342.15093-1-vivek.gautam@arm.com> <20210115121342.15093-3-vivek.gautam@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-TUID: 5GTwZm4l3gMS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210329_172643_585142_AA5CD5E7 X-CRM114-Status: GOOD ( 16.44 ) 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 Fri, Mar 12, 2021 at 06:17:55PM +0530, Vivek Kumar Gautam wrote: > > Regarding the overall design, I was initially assigning page directories > > instead of whole PASID tables, which would simplify the driver and host > > implementation. A major complication, however, is SMMUv3 accesses PASID > > tables using a guest-physical address, so there is a messy negotiation > > needed between host and guest when the host needs to allocate PASID > > tables. Plus vSMMU needs PASID table assignment, so that's what the host > > driver will implement. > > By assigning the page directories, you mean setting up just the stage-1 page > table ops, and passing that information to the host using ATTACH_TABLE? Yes. And we can support nested translation with SMMUv2 that way. But with SMMUv3 the guest has to manage the whole PASID table. > Right now when using kvmtool, the struct iommu_pasid_table_config is > populated with the correct information, and this whole memory is mapped > between host and guest by creating a mem bank using > kvm__for_each_mem_bank(). > Did I get you or did I fail terribly in understanding the point you are > making here? Makes sense Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel