From nobody Mon Nov 25 10:50:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@eviden.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=eviden.com); dmarc=pass(p=reject dis=none) header.from=eviden.com ARC-Seal: i=2; a=rsa-sha256; t=1716297172; cv=pass; d=zohomail.com; s=zohoarc; b=YUCA/i+UFr1QHgqv2YYl0dKUtzy9m79eL8NVKGS2//Z7VJtEpGzgOmWGCij+c6vsm6pUyinod3iCz7zai0BdLxrpW550Pn760gnjsU4I0OPnR8cLGqM8AHhOUB3Y5iMhPeavVsk5iPsSKji6nAAvMx+IWRUCzirXoBEFR75E6kg= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716297172; h=Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JJToM5aUVZELZtQhaipfZSocc6vx0ws4JjCmNvITMS4=; b=fjcgp3lkoaKurZrWB3jlXdRlWIhymovK4tGAjpkSCFe4GJSa5BLQvgo9TpGIXPZ+DY7cLDKCLuC5zN8lVTYMkQToXMqeHIXT0uDWgQTEngR2mB9B6FvPzXfzQEmNIQqPWkzxhSj3/mvHzMwGc8MBdIMAjRi2GGYlow5niKOUqdw= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass header.i=@eviden.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=eviden.com); dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171629717226418.564936477592596; Tue, 21 May 2024 06:12:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9PHl-000807-7h; Tue, 21 May 2024 09:12:09 -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 1s9PHU-0007i4-FC for qemu-devel@nongnu.org; Tue, 21 May 2024 09:11:55 -0400 Received: from smarthost4.eviden.com ([80.78.11.85]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9PHP-0001aH-MQ for qemu-devel@nongnu.org; Tue, 21 May 2024 09:11:51 -0400 Received: from mail-db8eur05lp2105.outbound.protection.outlook.com (HELO EUR05-DB8-obe.outbound.protection.outlook.com) ([104.47.17.105]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 15:11:42 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AM8PR07MB8148.eurprd07.prod.outlook.com (2603:10a6:20b:323::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Tue, 21 May 2024 13:11:41 +0000 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d]) by AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d%5]) with mapi id 15.20.7587.035; Tue, 21 May 2024 13:11:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1716297107; x=1747833107; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=JJToM5aUVZELZtQhaipfZSocc6vx0ws4JjCmNvITMS4=; b=Q4ORA9NQzvt/9qGsZ9NsecRk1oRlnQPuGSjQc/a/Pn1skVBgL26ybrtK 0KPrntxOrabZlrLTnw7k1L4OUUGZbqYciTjGSppBD3MUjvz0HTC7z6xZq WmpQI7eJPtg3ZgxuWsUjLg8Qnf8r28NIx1vUv+r1nm5H5itON/HTNHuZb DTXWzMyjrApZfRT25uk1UlfCyAao8Qd8sqCB6KyZCfvQ6g0qUL8tkheEc yuLtJd+CwM7hSn4lfGoYqsJusau8Y/1XTmaSwDHMeAstcbF5GYQ/v9C6k SVhPrZXKCZIAHKHmqlRVywD96bz8q1UK6kWE0vgV/3+s8MsJSQus8E8zn A==; X-IronPort-AV: E=Sophos;i="6.08,177,1712613600"; d="scan'208";a="13061499" X-MGA-submission: =?us-ascii?q?MDGGmiUBTtPJ58NJ3am1XcxCnTVKvHX9z2M7Zb?= =?us-ascii?q?68JTmXlydljWyvft7Sm5CVtmJ/EZellkdczteT8VVfZ+n5jRFC2pxw5J?= =?us-ascii?q?cfGc9+HZDZEFY0xm0pnnf3UqKQ3549K3yQ7PbrgWA1U1ifSvOvcooiQ6?= =?us-ascii?q?MHa9HwwwQlYqbYmCfci6cDiw=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PVqjDoiaN5fLIVimr0e/TAcbscvVjwz39szuZOhf71/yzbppimVUs6TA/FUsugN2X6i48CbCKdpwbX4WBnIGVJ7Yb7JOZlpDpoZCbNhMpe3a8DEohFfaDJQp6IHzJMXq3Zb4uqMvGuPrWpVIisIjIE/qpurYX4L27vCV6zmvENtKVURxiGeDjN+v84o9DEOOhAxm8h7bRw/8zfHn4DtZGba9Llx3owq82lTeKa9pvK1N7buU9M/9uP4sTOG3zXLHmeckdB+4R2xPbJjwU7QLoEBUoaBLwE/nzLXlepOCFcoj4lMuz2FuiwEJSwPInWnVd7aAxrIeSJKi+KfmgVQEyw== 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=JJToM5aUVZELZtQhaipfZSocc6vx0ws4JjCmNvITMS4=; b=Taq9Lwr2dFpCIF8fy9Ul+bxt/Wm6eMeqm/D++C+M8oV2rdGBd5Cl7gCLCeybGq7xpba77VplJSaGBU3N2bkOwcYnnPTQrd11sDYobyCO5lgsh5oAhCzB3xul6P8BHm1Tm6qPA4BAJ+vztt9uFaT/+/Kyr9INIVudGDfHZ65qT75gwZcPkg/I9XR9Jd0T3FrcpoU0R5Ac0iixNUGoBGsFrsuEzqZpBlVRZVhm3gtlP/y6S4UHRwhYmrn34hgcYwByIB9Py7+XSKIq/i2yjZSmlal77nTFJEC5RaLvL62H5Zp45qxRc5m0hCn5RZWNsC2DwLthOjIu5gxUj2o+yEiY/Q== 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 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" , CLEMENT MATHIEU--DRIF Subject: [PATCH ats_vtd 06/22] pcie: add helper to declare PASID capability for a pcie device Thread-Topic: [PATCH ats_vtd 06/22] pcie: add helper to declare PASID capability for a pcie device Thread-Index: AQHaq4BsddIhOUtVnUa3KEFa1N4Zig== Date: Tue, 21 May 2024 13:11:41 +0000 Message-ID: <20240521130946.117849-7-clement.mathieu--drif@eviden.com> References: <20240521130946.117849-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240521130946.117849-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_|AM8PR07MB8148:EE_ x-ms-office365-filtering-correlation-id: 2cbb2d2f-5b03-4f81-814c-08dc79978e86 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|366007|1800799015|376005|38070700009; x-microsoft-antispam-message-info: =?utf-8?B?OEpRb2NoSCs0NWtEaGpKOWdjTVJLNC80TjlCdWthb0JQZ3FhalpjNVF1QTJq?= =?utf-8?B?V1NNWkY1bVR2VWt0SENPRGdEdXFjZmh0aUxPcEFWejFNb0lBb0lia2QzMWNm?= =?utf-8?B?VjRQaWxBUFZHZGhiTzh4MnNObDFYMmVibmJmWkFXc2ljTHdwODdXaG0xL2JQ?= =?utf-8?B?TnFObG14RXkzNEJ5cGVaQkdlRTdYVmwrMmozT3FvUlBUc1hPS1RoN0xSckNu?= =?utf-8?B?R0o0WXVERzNJUFVxeHpUREIvdER6RUlnUzh0WXdtVnhrSXI1MVcxOVpMeGl2?= =?utf-8?B?b00xa1F0N1o1OGdCVjhtSGlXTVJKOGtqNXl0WXhHMGhxVDNvS1gzSlRTdnNZ?= =?utf-8?B?dzlUdnhHRXQwdmZCaUhmSlBvTXZqRmpJcG01VFpxYy90Qm9OK1VLQmxmdGta?= =?utf-8?B?UGhsZlFTQ25URFpYWmVMOC8yUVdPMDhTY1NITnR3Tk9nUkQ0K3lldVd0cldq?= =?utf-8?B?MmxRSTRXNTFOelBGZ25UYkV5eWtlZVpNLzVvamV0RlQ2a1hCYTlNaHRNZHda?= =?utf-8?B?VGF5S0sxQU96MGtEcUNwTi94a1RtdnFNM1hKZzY2Z2I2Z2c2MnpCUXhXTGNG?= =?utf-8?B?VnRsVWJXYUhCQ1Zj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lBrTUVLbEQwVFRKUGUzYlZDaG5sejNVL1VDVzN2MEZKVzB4?= =?utf-8?B?bFJyMkxIaE9FSC9iRi9YcjFHZnJ3UzAvTEZsS2ZDbEVPNzgrVlB2a1g0NFVJ?= =?utf-8?B?ekZKYWRXU0h0Ym8wdkFsYTE5Um5CYm41eFovVm1tWDFjekpqbGNVbDhnTlM5?= =?utf-8?B?bTVTdkF3Ti96ZDhxeXg4MVZhRWd2Y3E2NUQvSXFDSWxGdDZWekorakRVRXAz?= =?utf-8?B?MjdaekRZbW9JSkhGLzZNUVRuR0V5UWMyU1o2VmUyUmpUZ3p2dFFGSVZDUG8z?= =?utf-8?B?UGhrWVQyQkF2Vit0WndBZz09?= 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:(13230031)(366007)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?dnRmMWphVEoyTDMvOW5CT2ZySHVCSDZIdjA0SUpja0lTT0k0T0UwcHh5QTJp?= =?utf-8?B?NWU5MmpOSC91eVl1OFNhSEV0eTJkczhPOXNoVVErLy9oZlA1Z1VIWjJsVndz?= =?utf-8?B?ZHBRWm1qanZob3pUOWtrNmV6azlLWFp0bXk0d1I4clh6WTRJSVdDWEdvWEtN?= =?utf-8?B?azNaVzRuNXBwbE9jWXBpRXpqVDNTbXZBY1pVMkVWWlZmeERNQTE2S251MFZG?= =?utf-8?B?UTY0SG1EL25ua1ZIU3hHODBydUU3YnNPQ0xIU1hKV2dWaXl0SXhzNTlXdERJ?= =?utf-8?B?VHBUWTVWNGoyWGhTQklQMngzOUpUYnROd1RSb2xmNzZ2UG80VklUVGNnSVph?= =?utf-8?B?dnNwNnZHaUVWS0ptc2NUVC9rdENmMzNkV3Vya3VMZ0duYWh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TNZNGuYDmtGUdtaWRQtM=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: quoted-printable 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: 2cbb2d2f-5b03-4f81-814c-08dc79978e86 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2024 13:11:41.7446 (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: ZMRGYmhClema51FExHKXmDWGnVVZdqvdFnIt8sqY8NTBuoXx+zfuzDfvQl9aY7cO/G9rGOHdr1MXBEwtBfYFN5+3QFCyDOH4BO4pQ/tiUn7XLUOUBGbtY3yxHKEkIySk X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR07MB8148 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=80.78.11.85; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost4.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @eviden.com) X-ZM-MESSAGEID: 1716297172750100002 Signed-off-by: Cl=C3=A9ment 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 <=3D PCI_EXT_CAP_PASID_MAX_WIDTH); + static const uint16_t control_reg_rw_mask =3D 0x07; + uint16_t capability_reg =3D pasid_width; + + pcie_add_capability(dev, PCI_EXT_CAP_ID_PASID, PCI_PASID_VER, offset, + PCI_EXT_CAP_PASID_SIZEOF); + + capability_reg <<=3D PCI_PASID_CAP_WIDTH_SHIFT; + capability_reg |=3D exec_perm ? PCI_PASID_CAP_EXEC : 0; + capability_reg |=3D 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 =3D 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; =20 - /* Offset of ATS capability in config space */ + /* Offset of ATS and PASID capabilities in config space */ uint16_t ats_cap; + uint16_t pasid_cap; =20 /* ACS */ uint16_t acs_cap; @@ -150,4 +151,7 @@ void pcie_cap_slot_unplug_cb(HotplugHandler *hotplug_de= v, 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 =20 +/* 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-h= eaders/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 */ --=20 2.44.0