Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp57017pxu; Tue, 1 Dec 2020 06:07:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkEYKTSNG0eGwh5I1j/0mNGotrRMubqjU6TJb0UeDgZLhiUFYrgT6XIphUyhMO8FvoLFaj X-Received: by 2002:a19:c701:: with SMTP id x1mr1340684lff.516.1606831666858; Tue, 01 Dec 2020 06:07:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606831666; cv=none; d=google.com; s=arc-20160816; b=knGW0ae1gLx1b0AT4wZb9/OUDcXCBGu8DfjIWrfYRB2rEPzyWf/z7T4yazlLr+gZW1 f+aR6cuyk0CckHHn63AXqIPDM1PxQ3Pi1lgk5tQMFfN8FNK0HKSxzKU2HtM+u5jSMzu1 UB7GMT8rmQa3/mTFcRIJiY1nsihm9vt+sGCoZaeSWcqzx4nZrGbSE4ir/GhB2G2/bYxh SmSm9jTHJsW5q+AZGLe90Fw+6u6FmDaIdCdf6emqlbg0qH9pxqIZrYGPn5YDXZaFxqS8 7rI4iGJPwuOf7H6qmCfPjCmuIjIepvKOSMVEddtEB72M1MZ9OowxHnocBEgHqAw+p+J+ 0jTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=PwJG1illbebhBKC5v2IxyfNes6/XlUwSexlIWlX8yvI=; b=NJ22P1EQGhAFJm7aIuSHxfTYwspnELCA+ajVTCzRIm886fPHgmJVQTCCxaLjSiE6Lt BEx5kYNxzp3pIcEDK6rehEjiOj66ztn8tS+eUM6ztKQ9QRWWzrRPT8IDEp8ljiuGlEzk YjLWEsgySGQi0B2xi2Ezb21O7SgFYAy6Z2DdLlQXL8EsNZzkCqtS5lqvdhwaI9SuZ0nY 91A8riYFryFQ9NqW///spRxL1LyPK6G1bXs2Yc8c28on5Zf3xd2wtV/7uTIm5r9L3H1O 1qm3zY2muyA1V375lVOtWV7eXMi8Qq/frn0xmIwsEoC0duK6gVNAV5cVsqr2JMnhlj2o hZpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gOH7VivV; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si910916ejx.289.2020.12.01.06.07.14; Tue, 01 Dec 2020 06:07:46 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=gOH7VivV; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388409AbgLAOAe (ORCPT + 99 others); Tue, 1 Dec 2020 09:00:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41892 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387744AbgLAOAd (ORCPT ); Tue, 1 Dec 2020 09:00:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606831147; 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=PwJG1illbebhBKC5v2IxyfNes6/XlUwSexlIWlX8yvI=; b=gOH7VivVmdP+EKBhsUJ655Q6Lgbpcytsk0V4x4Af13cyM1yOOtUuXOhpx6guSiY1/PKsaK KC2RFos+p7VoCjaxvUNs2vhe7IAcSR/y6asfx/bO5BT8o79XUnUH/fakd1EQd2QbscWJba 6QRSqdjK9AfOgVFZQnNZ4fiOivgqByE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-161-wovMo1sZOu2TKbhHgVoPFw-1; Tue, 01 Dec 2020 08:59:03 -0500 X-MC-Unique: wovMo1sZOu2TKbhHgVoPFw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8FF338558E9; Tue, 1 Dec 2020 13:59:00 +0000 (UTC) Received: from [10.36.112.89] (ovpn-112-89.ams2.redhat.com [10.36.112.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8A1A5C1BB; Tue, 1 Dec 2020 13:58:53 +0000 (UTC) Subject: Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs To: Xingang Wang Cc: alex.williamson@redhat.com, eric.auger.pro@gmail.com, iommu@lists.linux-foundation.org, jean-philippe@linaro.org, joro@8bytes.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, maz@kernel.org, robin.murphy@arm.com, vivek.gautam@arm.com, will@kernel.org, zhangfei.gao@linaro.org, xieyingtai@huawei.com References: <20201118112151.25412-8-eric.auger@redhat.com> <1606829590-25924-1-git-send-email-wangxingang5@huawei.com> From: Auger Eric Message-ID: <2e69adf5-8207-64f7-fa8e-9f2bd3a3c4e3@redhat.com> Date: Tue, 1 Dec 2020 14:58:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <1606829590-25924-1-git-send-email-wangxingang5@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Xingang, On 12/1/20 2:33 PM, Xingang Wang wrote: > Hi Eric > > On Wed, 18 Nov 2020 12:21:43, Eric Auger wrote: >> @@ -1710,7 +1710,11 @@ static void arm_smmu_tlb_inv_context(void *cookie) >> * insertion to guarantee those are observed before the TLBI. Do be >> * careful, 007. >> */ >> - if (smmu_domain->stage == ARM_SMMU_DOMAIN_S1) { >> + if (ext_asid >= 0) { /* guest stage 1 invalidation */ >> + cmd.opcode = CMDQ_OP_TLBI_NH_ASID; >> + cmd.tlbi.asid = ext_asid; >> + cmd.tlbi.vmid = smmu_domain->s2_cfg.vmid; >> + } else if (smmu_domain->stage == ARM_SMMU_DOMAIN_S1) { > > Found a problem here, the cmd for guest stage 1 invalidation is built, > but it is not delivered to smmu. > Thank you for the report. I will fix that soon. With that fixed, have you been able to run vSVA on top of the series. Do you need other stuff to be fixed at SMMU level? As I am going to respin soon, please let me know what is the best branch to rebase to alleviate your integration. Best Regards Eric