From patchwork Mon Nov 6 07:12:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Tina" X-Patchwork-Id: 161836 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2487846vqu; Sun, 5 Nov 2023 23:14:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjVbIvC4QNGydMbCb9WNSX0WBT5O+N5yyrQDZ6pHXZCvVPrVPMJcer3NRCWzEkKvaLOm08 X-Received: by 2002:a05:6358:5e14:b0:169:51f1:b097 with SMTP id q20-20020a0563585e1400b0016951f1b097mr28883586rwn.9.1699254891163; Sun, 05 Nov 2023 23:14:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254891; cv=none; d=google.com; s=arc-20160816; b=qruBXoQQo/WjFChZgR5sk83z0dbB32ND28AEz8f9TNn4AvEG7w+B87357cCTMYLwv2 1QYNwmNJTF4cgHU2v7PEtJmv0tgmm0Y7kIRPCAaaE1WYLUSLo2/nvCHUbcWB9rQUfYUd 7Nhxyf6MIpuoO1TIsONxYzogTz83S28m04tn7rZKZpzH4FPK7Caa8qw8pIJU1xshrhaj oIpH+Jsz5OAfim/3NyAgF6SvvI68hC73mESyPRDiJNyq7zP7YQKaw5WLzE2036RmB/cp q44Khu2vXQef7Y1QzHCW9Q7TVXhiFtXTL9Jd/mma0EJu3Rbi0KDW0vBUEUAhPC9pUT5z LI0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5WNSJDRH/exdpoDprUS3Iv17Tw6NE3O9LoXRfx312Ug=; fh=Q9/c0/1s/r5nQXfLb7W3lFTON2d/CYIL48MtbxJzpb8=; b=F1Qrat8tp/IF5fyDdrWdn7gxTkfP5AIa5mTwduWXnDX4z9EhVEqXWXrikyk4cRRpOO SO47B5hMtg4WfUg7mCDKKQsugqhUpBliJCFkBTmUUuu3f3stdyX09P73Kzw0DAiVov0p g+JyJ4tYt4Ko5goKlmw3YJ/w1xu4NKD6H/OBdxgxDkl8iEWFjS2FVa8tNCsa0c0jl1Pp HA/w1pZYwgBBbetUreLF5u8vSxG1SpPKOoUeNt/3OCvY6SDsZV7wBxnyxOYSSCxs65zA HjgRPBFOk4BM9+i5m5rvjUS1Ry796PRMgUHcN+O9gSKaja0ZUJDr27N+qH0Dd0EBgkjx PXQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iCGJDlT8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id 4-20020a630204000000b005ab190f9504si7478853pgc.602.2023.11.05.23.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:14:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iCGJDlT8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B1206809C926; Sun, 5 Nov 2023 23:14:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230511AbjKFHOK (ORCPT + 35 others); Mon, 6 Nov 2023 02:14:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbjKFHOJ (ORCPT ); Mon, 6 Nov 2023 02:14:09 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44D71D8 for ; Sun, 5 Nov 2023 23:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699254846; x=1730790846; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gWxXYuEpy8G84pCRxEr8zR2qYt2dBXJPyl6P3BJNrtQ=; b=iCGJDlT80R6YCHX5t8JBh5lfoEhLNwqldMKYrIszg6vl+2jAWpg5MPKj fv+avqXdwNJAvcnaROHzr7Uj+ktrVGazLbsl9UNRcUx0SF30HdDfCqlpR QywpLBbS6x8zTZK6oaS4ifXvKn87imaFo7sF9SANme1m9GXEIvud7r/Um /Sqh1MKpPmzSx/91yGbI4BNHot85N1WZLNvrsCXRCntnYJacqJbkhIM+v TW8pa2lCHZxn9reEIlKOAs/agXepX84ib4yGF5wuVS68x+Qh1+Ub1PsxX JtQfbovuLeU9g2z3YGPNvEm6YbT6xLNd8k+i+Skz1m5nSRVnounzUB339 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10885"; a="10759058" X-IronPort-AV: E=Sophos;i="6.03,280,1694761200"; d="scan'208";a="10759058" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2023 23:14:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10885"; a="1093690893" X-IronPort-AV: E=Sophos;i="6.03,280,1694761200"; d="scan'208";a="1093690893" Received: from sqa-gate.sh.intel.com (HELO localhost.localdomain) ([10.239.48.212]) by fmsmga005.fm.intel.com with ESMTP; 05 Nov 2023 23:14:02 -0800 From: Tina Zhang To: Jean-Philippe Brucker , Kevin Tian , Lu Baolu , joro@8bytes.org, will@kernel.org, Yi Liu Cc: virtualization@lists.linux-foundation.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Tina Zhang Subject: [RFC PATCH 3/5] iommu/io-pgtable: Introduce struct vtd_cfg Date: Mon, 6 Nov 2023 02:12:24 -0500 Message-Id: <20231106071226.9656-4-tina.zhang@intel.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231106071226.9656-1-tina.zhang@intel.com> References: <20231106071226.9656-1-tina.zhang@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 05 Nov 2023 23:14:48 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781797896982537760 X-GMAIL-MSGID: 1781797896982537760 VT-d hardware cap/ecap information is needed for driver to generate VT-d format IO page table. Add struct vtd_cfg to keep the info. Signed-off-by: Tina Zhang --- include/linux/io-pgtable.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/io-pgtable.h b/include/linux/io-pgtable.h index b2857c18f963..ae6a2e44b027 100644 --- a/include/linux/io-pgtable.h +++ b/include/linux/io-pgtable.h @@ -147,6 +147,11 @@ struct io_pgtable_cfg { u32 n_ttbrs; } apple_dart_cfg; + struct { + u64 cap_reg; + u64 ecap_reg; + } vtd_cfg; + struct { dma_addr_t pgd; } virt;