Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1953696rdf; Sun, 5 Nov 2023 23:14:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGo02xif7zvUJaAJFkFoShIaOlr4D5foeB2uKPIuALc3Jr7lojeMldHiXKtW0guOnhmjtol X-Received: by 2002:a05:6a00:1825:b0:6be:1f19:e5f0 with SMTP id y37-20020a056a00182500b006be1f19e5f0mr37094325pfa.25.1699254899518; Sun, 05 Nov 2023 23:14:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254899; cv=none; d=google.com; s=arc-20160816; b=Ih+/Rjr1ODz8HQfbImLxJgWMNEtau0FBIaSN3wbVQ3HxJCDbAv+Ljf2YEFzzuvxBHN d5VR5tmRY51hgfdmVNkNznp6k0A2WMag4DbQWXvKJrqDBO0Yt44Jdj/W8e3qzlZY++87 vDN93k00aia1dxvEw72jPKMYdR9Z0d7BJrk3mswowCQWmInotdDZD3xTSgVD+DN7bMfo hMscf3ACFOuIe20YJ1Lf6E35ToJCwnc37Vk6aUlFm/n20wfZ/MMg9G/OuP9nLph9dcrq WxqHOpcPbcwDqFIPLysIyU7CiRzuBpsJeV1dXK3DNhgFptxWtJH0h9bUTe0ep2S0FInn Kq2A== 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.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id k190-20020a633dc7000000b0056357813fc2si7248944pga.183.2023.11.05.23.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:14:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; 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.38 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 fry.vger.email (Postfix) with ESMTP id D571980A236E; Sun, 5 Nov 2023 23:14:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230510AbjKFHOK (ORCPT + 99 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 Content-Transfer-Encoding: 8bit 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 fry.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 (fry.vger.email [0.0.0.0]); Sun, 05 Nov 2023 23:14:57 -0800 (PST) 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; -- 2.39.3