Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp877017ybz; Wed, 15 Apr 2020 21:27:14 -0700 (PDT) X-Google-Smtp-Source: APiQypI1MGB8umSHmH1QJt8zEXYUVHq0FePui8bVA/YFQNsNjc2C49iMAHDGstgUpJup5YJrZFUJ X-Received: by 2002:a17:906:4351:: with SMTP id z17mr8110219ejm.346.1587011234638; Wed, 15 Apr 2020 21:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587011234; cv=none; d=google.com; s=arc-20160816; b=k3Pu5SQSmNxHQp24MG6BcZ58hE+X6ew6Pi5M87Ag7vw8JcD2oDgY5BqvMSaVCDMx6j +/tXPZBhBLBfD4NTbaXTadXnwOMPNbwrUw5BkrtQcZpyS6HgfM1qNk5hO61hSoE/uiDc j08FOPY7HNEOlld5Wyfmm38lMCHx4C7PmvFC+fS35dADwXf6TUCcATw9PV40/KugcNIG Sa7++dr4IknjPnlC4FcUsBd+UHDv+7rBQI1ntwOZQDIGuLHS+tSKXhK/MHaZjdpZoEX+ ZWtvB/uIVSjMb06ZcrY3v8nt0xLXu8WfPvLYvItKNriRre/ZeUH+bh1MjcFIfzZQu6Tq ZbpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=rKdwxJq97I01y7ryQhSihbE5DvwLxtqugoVKkJX3ixQ=; b=BfNwuKQisx5JStvlpqXGLSyFIcAQbk6wUXUSUTt+5I85E+SIXPFd9VKVptYoqNE/fu 7rkWh8EX7gi04k8NiMMJVZWIkXmjnUhqyuwISvB9Utmktin0M7VPZtHEzeyOpJLuCcGb hNMoCWnckz93O+i6M63mZmTReKWCpegM3mzXzItUFIjvonJUSl6q7zepszNMoGZ57PYr adFJjjvKkezOQfAdPoWh07NBgc4Ex3AA+107q8wwHzObsPK/3AYQ5V+S5HArEVhw8hRh UDmjzBvbKhwcBaoNQHudQAVeulf21wKleVEZiQQAS428FIy+G+Riviwju8RK+0q5jGRq w4TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wydQ1wV/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hh3si10989946ejb.177.2020.04.15.21.26.48; Wed, 15 Apr 2020 21:27:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wydQ1wV/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403916AbgDPEZu (ORCPT + 99 others); Thu, 16 Apr 2020 00:25:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403897AbgDPEZs (ORCPT ); Thu, 16 Apr 2020 00:25:48 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F2F7C061A0C for ; Wed, 15 Apr 2020 21:25:48 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id z9so830336pjd.2 for ; Wed, 15 Apr 2020 21:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=rKdwxJq97I01y7ryQhSihbE5DvwLxtqugoVKkJX3ixQ=; b=wydQ1wV/OhVMd3QRFRKKNzkbsnXsrk7VwwEFQLbqM5ghK2myZ3rUwtN43+86ag5Yt2 TOVAOmy3v83wlL5xBTadZIUPf+hW0tBsAuWepalWfrbGXhvYreeXUsNypMLEaIpgpwvr PdXGZjbSqpgXelubvmrELN3048hxl5mUCg3NnN2b4krIxxmP0EodZKg13/EFYF9wHYZu th6OcVEd1GYkAlpaK0/CDS+PavGH/YJhb9gM6FMd2Hn30UAhBpPttl/yVOnQckXFs1+9 ByjKBlDgOAaMd4fSyIWUuB3lXPe1GalgZBYhX0Jk2ev8iAwwfXtj7rBzBsG2jmmx/old tBew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=rKdwxJq97I01y7ryQhSihbE5DvwLxtqugoVKkJX3ixQ=; b=ecuUcDQfvc0fSgHz3lFOTuZwe8iioSm9Zlw6sUJGriNXILk4AXwNrh96Tppm3nK/l6 yxDgpF3NI3bR8eI3kBBSYVT6yo5ydVUQ1wnhwlXOakjeZiKLg2I8607rsN8NgQo4V6GC U2J0GuAVcvbGzBQ1WQ6Fn617qOzU1a3bIcuo+pXwr0m00bHKpteBR5VX5UnODyKJ8QYq 2Xoad7jCW3HvX+eZIemLiVrIQ55DWnNsVxYH9vclYf9iuFppgXDkWb18vNDxJXbx8WB+ mA2+vXumBY7z+ODgBVbnWbS5Y2q4MNpfuAjD4f6Ddv7EZA7cn57oo7o97DKTMmB5Ykh+ fWGg== X-Gm-Message-State: AGi0PuY9xirsB3dzejiAP8jOJcBO32DvCzf1O2At7kpavk1QvX4KHP7v Mq4/UQdH2rU1xsm+tD4k6smhIA== X-Received: by 2002:a17:90b:3547:: with SMTP id lt7mr2650982pjb.96.1587011147553; Wed, 15 Apr 2020 21:25:47 -0700 (PDT) Received: from [10.129.0.126] ([45.135.186.84]) by smtp.gmail.com with ESMTPSA id e29sm10568241pgn.57.2020.04.15.21.25.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Apr 2020 21:25:47 -0700 (PDT) Subject: Re: [PATCH v11 00/13] SMMUv3 Nested Stage Setup (IOMMU part) To: Eric Auger , eric.auger.pro@gmail.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, will@kernel.org, joro@8bytes.org, maz@kernel.org, robin.murphy@arm.com Cc: jean-philippe@linaro.org, shameerali.kolothum.thodi@huawei.com, alex.williamson@redhat.com, jacob.jun.pan@linux.intel.com, yi.l.liu@intel.com, peter.maydell@linaro.org, tn@semihalf.com, bbhushan2@marvell.com References: <20200414150607.28488-1-eric.auger@redhat.com> From: Zhangfei Gao Message-ID: Date: Thu, 16 Apr 2020 12:25:35 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200414150607.28488-1-eric.auger@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/4/14 下午11:05, Eric Auger wrote: > This version fixes an issue observed by Shameer on an SMMU 3.2, > when moving from dual stage config to stage 1 only config. > The 2 high 64b of the STE now get reset. Otherwise, leaving the > S2TTB set may cause a C_BAD_STE error. > > This series can be found at: > https://github.com/eauger/linux/tree/v5.6-2stage-v11_10.1 > (including the VFIO part) > The QEMU fellow series still can be found at: > https://github.com/eauger/qemu/tree/v4.2.0-2stage-rfcv6 > > Users have expressed interest in that work and tested v9/v10: > - https://patchwork.kernel.org/cover/11039995/#23012381 > - https://patchwork.kernel.org/cover/11039995/#23197235 > > Background: > > This series brings the IOMMU part of HW nested paging support > in the SMMUv3. The VFIO part is submitted separately. > > The IOMMU API is extended to support 2 new API functionalities: > 1) pass the guest stage 1 configuration > 2) pass stage 1 MSI bindings > > Then those capabilities gets implemented in the SMMUv3 driver. > > The virtualizer passes information through the VFIO user API > which cascades them to the iommu subsystem. This allows the guest > to own stage 1 tables and context descriptors (so-called PASID > table) while the host owns stage 2 tables and main configuration > structures (STE). > > Thanks Eric Tested v11 on Hisilicon kunpeng920 board via hardware zip accelerator. 1. no-sva works, where guest app directly use physical address via ioctl. 2. vSVA still not work, same as v10, 3.  the v10 issue reported by Shameer has been solved,  first start qemu with  iommu=smmuv3, then start qemu without  iommu=smmuv3 4. no-sva also works without  iommu=smmuv3 Test details in https://docs.qq.com/doc/DRU5oR1NtUERseFNL Thanks