From patchwork Tue Jul 2 05:52:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: CLEMENT MATHIEU--DRIF X-Patchwork-Id: 13718986 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C14E3C41513 for ; Tue, 2 Jul 2024 05:54:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOWRb-0007yA-I3; Tue, 02 Jul 2024 01:52:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOWRZ-0007xh-Sl for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:52:45 -0400 Received: from smarthost3.eviden.com ([80.78.11.84]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOWRX-0006Tu-FZ for qemu-devel@nongnu.org; Tue, 02 Jul 2024 01:52:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1719899563; x=1751435563; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=X34qgNpvmNLKL+VXXKfSHCmNzf0ODL2lEPqu6K2/sUk=; b=DnGW/Ib7PTl8KO3qkyP9rYsbzsqc5ZJ4nLOJ/aNlkjB/rYycFp9Df1+w 8Aq0EzA68FtxRpNA/+wQmanFmZLi45k2xGRYjU0tBx6z60HGkjXaERTUW Kkd368hUYicGZ5owsvjQ7/Kp+dEU+Ai1O3PK8lr6sbXXPhLz0dU36Vrdt kXxla6vcU7H1fDmdbhuMzt9IgGr1aJpG5f6gUpjcTgFrbS1uTY1B0ZJ69 N6xOyx1eX9jQZKe3BTeaiSD8IUImZMWVRwCig4XL5QtPRndD5tlG6uQ6o 4aPutnvxyqyxNDjqLf3UeFqKDvW6gEdM7T071BbJKvCAjyzYsK0zbvHdy g==; X-IronPort-AV: E=Sophos;i="6.09,178,1716242400"; d="scan'208";a="15721584" X-MGA-submission: MDGPKMREWgFGgTAMo+3y5D5JyNVVxl2/mN6Qc5509DPEPtB7TwqH82iMT/PLsAbt4GGfSY+5lTLK3NgBPK+ePk3zM7j/5LKXA/wqkPlm2SLgTBe+mPgOVsHM7iM9N5uODf/ey3shMomLMpQ2xbEM8PA0s321GA+v28fplcQ1RGxZNw== Received: from mail-am6eur05lp2111.outbound.protection.outlook.com (HELO EUR05-AM6-obe.outbound.protection.outlook.com) ([104.47.18.111]) by smarthost3.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2024 07:52:37 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=co9Z/CYgKHX9RPFwBfrKbD5WC0ggKBy7Wi4y/miFKWxjZi9ffVL+EGzXzWFroprsvdY61NqdSEe1z8CiW6BOhhwJCjAI8juHsGqG/cn+FBKlUgx4yW6xdCp8nsleUUxxEFjI5tZbBLH9uUdvt4D5XnKjIpQRuXmzE3+uMClpyPbL41kyyLJQ+rP7h6kZ2MhWqLsQuYqrMWkpBg7PK0u5zoF9dgdkDuLktveHWO7RrGiUwzW2m4FO3AMj13Ls8Qvy9lzT02Xt/kSGYChJz2cvvBhwmjSjzp5BPfLUF7YK0RR1nDuci+koz7kwdRb4NanjLZHeFq/1il3I1xH3E3ATGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X34qgNpvmNLKL+VXXKfSHCmNzf0ODL2lEPqu6K2/sUk=; b=IJ1Wn2YTyh7uK8gma+7YJdqnsMm7dOhdGT38HlJQWiVwkAU0qamSw914nkpIghfh6MWS05liWUW3TZcIzt0auH3qVmmo7QlDbgxnR4GU/2nP2aUt0K2R/5vlNVpBRK5wl/SxQ1Dq7hmI44lZM/CUX2fi1xJ/7p6GzLN1LoG1XTSgkaSB5PnGrQbgU+Ut6GV9MjLIvnB821nOOcSe03ktdR6iK/3O06siQGVujQizF/ggeaeKAftZptzkRbMtC7QxcqlL0O2LZThgVHmgaIkonjEXMTMt06VGYYX5PxXONP0TRGvBmMZ020rqFJwM6oQjsTU25AJQsvZaYWxF5YgLxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eviden.com; dmarc=pass action=none header.from=eviden.com; dkim=pass header.d=eviden.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Eviden.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X34qgNpvmNLKL+VXXKfSHCmNzf0ODL2lEPqu6K2/sUk=; b=Me69v9Z/Ek8ag95LIQPXDWv1s25s40NyOooihjpNU/dESGOgw/xpb5XPnn/nj6F3J7N0qgyFaNbjtvhHsPb/qOoTXhS2/AkrMZiRGomQKGngdGRpruxSNiakmcT0m6zEQr31fLG34rMVSjsNwmBUixoEW+201Z3G2Of4k/0dH11/SAJz5pMo2ZbXRo7RuZgnWrjvdXOvr0UiA3TP7W0wXm/KLQ9vYCrE/7VQgKrqHqM8KXwEvCykpN4Wkp/NllWYl0YMKYAuGbkfJrJ52QN8xazP5C3bWhR7qR0DYNbryMhXdsV2AolAtReP7dStJOLC/nXV2f3CLhll276JSJ1yyQ== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS8PR07MB7080.eurprd07.prod.outlook.com (2603:10a6:20b:239::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.21; Tue, 2 Jul 2024 05:52:35 +0000 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d]) by AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d%4]) with mapi id 15.20.7741.017; Tue, 2 Jul 2024 05:52:35 +0000 From: CLEMENT MATHIEU--DRIF To: "qemu-devel@nongnu.org" CC: "jasowang@redhat.com" , "zhenzhong.duan@intel.com" , "kevin.tian@intel.com" , "yi.l.liu@intel.com" , "joao.m.martins@oracle.com" , "peterx@redhat.com" , "mst@redhat.com" , CLEMENT MATHIEU--DRIF Subject: [PATCH ats_vtd v5 06/22] pcie: add helper to declare PASID capability for a pcie device Thread-Topic: [PATCH ats_vtd v5 06/22] pcie: add helper to declare PASID capability for a pcie device Thread-Index: AQHazEQJfH+RmlRl2EizMPPk04nn5A== Date: Tue, 2 Jul 2024 05:52:35 +0000 Message-ID: <20240702055221.1337035-7-clement.mathieu--drif@eviden.com> References: <20240702055221.1337035-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240702055221.1337035-1-clement.mathieu--drif@eviden.com> Accept-Language: en-GB, fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=eviden.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM8PR07MB7602:EE_|AS8PR07MB7080:EE_ x-ms-office365-filtering-correlation-id: 10ab6147-d96d-4b17-b32e-08dc9a5b2c37 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016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mf0zv9nflABuMl7Nm2Wqj7e4Y1iQu4vI0wsdR3+539tV0ws5CLaY0UUEctfBVRb1?= =?utf-8?q?8hH40yfEy7Sm3oDdYVwxxDBPlmTG3hoAWkcnelt8+6a8I2NAeZHnc+tCuWFCJB9AY?= =?utf-8?q?6wVy5Yp0DxFnroRMdCHzuGY7m5l1XgBbWd2zk3SKNCen2PIuv6/h1J/G3weBpObqf?= =?utf-8?q?lBjtYIs23FUgxpec8KNHNQSu30+OVrMlmle9Oljn/4qdE8ESA7RbhsnjwmtGlOjF7?= =?utf-8?q?61XrafXLMBeMxLVvBaql+VzHvYGrzd9TVkwuzEI406eo2W3AVb4e2CcDcQCBJffr7?= =?utf-8?q?xMWRRAteyPEltOlz+xOllhwgTQmowwjp7DuaYo/KZzfWv90CjU3u4XfrqASFGxrLf?= =?utf-8?q?kRmhRGbaI5H7G+yEBLszwly04ry4cuhN2mqCU4fWuzqaFA/7OI4igWrxh1UwgiLFg?= =?utf-8?q?lfXiAE4ERNV4jv19qK3IrlnsSKzTs1ogm/xyd8oKIj0Cq+iSjvijy8ZsC2hMCe2mN?= =?utf-8?q?HKdzhhX9+w5/n+eY39/BD3K51ZeaFpOTCw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR07MB7602.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?sQHjKWuy3rxcCMJCHLnPs77+b7HR?= =?utf-8?q?dkOknB6oVrSviXjQ7wv7r3YdqWJGU+iRPDubE1hGUKWR+40g0Mqs7FticfxIaFplF?= =?utf-8?q?N0s+nU54RkUeg/SGMv3XXpm0O8X189MZghM69oIOAaCX+uFYxnrMaEZDqOM4jgPlh?= =?utf-8?q?XJiJ1jbVQJE5gj/x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3Z6amkNV2sNarT2axRRgfoJeH5LWiW/a5Z9?= =?utf-8?q?0bUPi22TNHg8Oyq3VmRDfbdIbFB9aUBr89VK1BnI0L4F/kH4rfUEU9RSEgvJbv9fV?= =?utf-8?q?Pisys1GDFvG9l7blO1Yrz69Q8XXP2SY+RAe5gbofDstyTP0OFOTrf7nHUeFL4Ozxc?= =?utf-8?q?9+yobKiGxXv3M3DwSS2g4UHzP7nseNwj8DEeM+YnFnF83gxlxjxSl9joNwcgbPe8Q?= =?utf-8?q?+AqHVj9NpcQ1YYaa0pnAoKJ38agyaMDjo3N/hUCRaKv0NsWZ/tpsnuvtr+w2v8Euw?= =?utf-8?q?6nFHj+iRdwjk/pHQe3bZjbQOSJNgTQC1nQBaiiUWKO5A4TR3LTXBGWVJT2RGcjyxF?= =?utf-8?q?iFzFKJ7vVzlPoi5xrPiXo4+5iGqCeNabjTpmetg8eQyNN0DLZhD/DxIkRBuVBa/hZ?= =?utf-8?q?gFBQA+uSV6cSq5c8C5lQ6m1Z+vNU/ATNXAdC6GKv34VRKkB6ofEklf2pvb8Jldc9G?= =?utf-8?q?CqTnk8MGlRgjSmZw1cKPFAWbPyZ5YHGTzSkJG5Et+XpC0VfEikn6o1A=3D?= Content-ID: <2A9D09EE5E89594782C8E2DC41846900@eurprd07.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: eviden.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM8PR07MB7602.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10ab6147-d96d-4b17-b32e-08dc9a5b2c37 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2024 05:52:35.3912 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7d1c7785-2d8a-437d-b842-1ed5d8fbe00a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CdMD2deWace6gzGOXKczNCCmjfzcgav52kHnsvXKM1Zt+mQAd4+yznjoGv6lRXw2UXO8RuIDHvaYBhJMeN7KChXftgYnL0UuRSGFY6MSC8cpSSZlgIxjQHEJvg9F8Ryj X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7080 Received-SPF: pass client-ip=80.78.11.84; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost3.eviden.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Clément Mathieu--Drif Signed-off-by: Clément Mathieu--Drif --- hw/pci/pcie.c | 24 +++++++++++++++++++++++ include/hw/pci/pcie.h | 6 +++++- include/hw/pci/pcie_regs.h | 3 +++ include/standard-headers/linux/pci_regs.h | 1 + 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 4b2f0805c6..d6a052b616 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -1177,3 +1177,27 @@ void pcie_acs_reset(PCIDevice *dev) pci_set_word(dev->config + dev->exp.acs_cap + PCI_ACS_CTRL, 0); } } + +/* PASID */ +void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width, + bool exec_perm, bool priv_mod) +{ + assert(pasid_width <= PCI_EXT_CAP_PASID_MAX_WIDTH); + static const uint16_t control_reg_rw_mask = 0x07; + uint16_t capability_reg = pasid_width; + + pcie_add_capability(dev, PCI_EXT_CAP_ID_PASID, PCI_PASID_VER, offset, + PCI_EXT_CAP_PASID_SIZEOF); + + capability_reg <<= PCI_PASID_CAP_WIDTH_SHIFT; + capability_reg |= exec_perm ? PCI_PASID_CAP_EXEC : 0; + capability_reg |= priv_mod ? PCI_PASID_CAP_PRIV : 0; + pci_set_word(dev->config + offset + PCI_PASID_CAP, capability_reg); + + /* Everything is disabled by default */ + pci_set_word(dev->config + offset + PCI_PASID_CTRL, 0); + + pci_set_word(dev->wmask + offset + PCI_PASID_CTRL, control_reg_rw_mask); + + dev->exp.pasid_cap = offset; +} diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h index 5eddb90976..b870958c99 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -72,8 +72,9 @@ struct PCIExpressDevice { uint16_t aer_cap; PCIEAERLog aer_log; - /* Offset of ATS capability in config space */ + /* Offset of ATS and PASID capabilities in config space */ uint16_t ats_cap; + uint16_t pasid_cap; /* ACS */ uint16_t acs_cap; @@ -150,4 +151,7 @@ void pcie_cap_slot_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp); void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp); + +void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width, + bool exec_perm, bool priv_mod); #endif /* QEMU_PCIE_H */ diff --git a/include/hw/pci/pcie_regs.h b/include/hw/pci/pcie_regs.h index 9d3b6868dc..0a86598f80 100644 --- a/include/hw/pci/pcie_regs.h +++ b/include/hw/pci/pcie_regs.h @@ -86,6 +86,9 @@ typedef enum PCIExpLinkWidth { #define PCI_ARI_VER 1 #define PCI_ARI_SIZEOF 8 +/* PASID */ +#define PCI_PASID_VER 1 +#define PCI_EXT_CAP_PASID_MAX_WIDTH 20 /* AER */ #define PCI_ERR_VER 2 #define PCI_ERR_SIZEOF 0x48 diff --git a/include/standard-headers/linux/pci_regs.h b/include/standard-headers/linux/pci_regs.h index a39193213f..406dce8e82 100644 --- a/include/standard-headers/linux/pci_regs.h +++ b/include/standard-headers/linux/pci_regs.h @@ -935,6 +935,7 @@ #define PCI_PASID_CAP_EXEC 0x0002 /* Exec permissions Supported */ #define PCI_PASID_CAP_PRIV 0x0004 /* Privilege Mode Supported */ #define PCI_PASID_CAP_WIDTH 0x1f00 +#define PCI_PASID_CAP_WIDTH_SHIFT 8 #define PCI_PASID_CTRL 0x06 /* PASID control register */ #define PCI_PASID_CTRL_ENABLE 0x0001 /* Enable bit */ #define PCI_PASID_CTRL_EXEC 0x0002 /* Exec permissions Enable */