From patchwork Tue May 21 13:11:43 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: 13669430 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 93D08C41513 for ; Tue, 21 May 2024 13:12:51 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9PHg-0007s3-Vz; Tue, 21 May 2024 09:12:06 -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 1s9PHR-0007fZ-Vi for qemu-devel@nongnu.org; Tue, 21 May 2024 09:11:54 -0400 Received: from smarthost1.eviden.com ([80.78.11.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9PHP-0001Zt-OH for qemu-devel@nongnu.org; Tue, 21 May 2024 09:11:49 -0400 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=FnPgbHkC17ljlEVDc30FuyLZ9hqEYmiwbjpX/Fru8IU=; b=FRGxHm9Kw5wTtUaMQLEqgFz5BCkIXR/UFIV3pZ7qD/4ZP70lTkNX/HTK zHCCFt5YHGw6B1jrSP3kUvrPk+bQ/mEZDy18OZPYG+TYCalDxE6JwmVaO F+WTqrpA6CwO53pM902qcYDorlbDa3edRPYVFDDwfmbe3o3OkZSF4LtHr CM9HlbOFbMdE8ODYGfgdaeqACYAJuK8ShQA0qWXatpytGlGSTravo3Q09 L+CpJIQEZkfBbE+DznN5eBB2wc7B9+y/m/AdYUxAkvYFZOYe92YkLP7yZ 2px5ZaT+wHl2z7Q1ld48X9yA6udvLITCaIWIko3kDiRBCrfyG9jm2HE5i w==; X-IronPort-AV: E=Sophos;i="6.08,177,1712613600"; d="scan'208";a="13004102" X-MGA-submission: MDEj2JkUrBop8uMRj8lln2EQXWm4iilFzeZHCWqi2Ec5ed9pENb8IOm190D4CPe/XIX+FzqNdi/F4r2HHbgOHUosMBO/nQmDBwOLGz7hfS/ikR7orEuL1fN7gUT5sdN/e3BrV8Xwgc7Wwtjj8L8g9r36pOAYTx0/0qgrtmjWWylbCA== Received: from mail-am6eur05lp2104.outbound.protection.outlook.com (HELO EUR05-AM6-obe.outbound.protection.outlook.com) ([104.47.18.104]) by smarthost1.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 15:11:44 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lz795raY1HEtpDEbbQi7qbiKkS4ftilrRj2TLrPXucniVPHI94vBmjxplFu5+Mjs+XZgGq5Kjjg+PpWqM4uxFIfXPMmczTGOj+2zKVlNRoQoUj54IpcPpCPrSbNC1omsdrI8Mc99nzdJ5z5Qt9D8kYfO0AsV1PkJD8UKnkHRxZVIJxqzLCe/AjgbqLrTgd+5hd8ngnjrLqxL77iJm5Oqy3tx5NoAh20tenUFTzHu34tjdMrzMmYUeMB8Q2POj3hdfrwFnDiVEzxXVQJ2ar4k5dsdCBqrUU/f4dfk2fBws7uNdZKjS8RpWrmSxWnpmI44GpK7TIeoYLdZYgh/CLdrxw== 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=FnPgbHkC17ljlEVDc30FuyLZ9hqEYmiwbjpX/Fru8IU=; b=LtkBgud/A77Enhf+OPAZM7hgCRlnKtZT5WR3l5UUdGUXIDGOVAJaVrT74xoNCQb/yvHgY4XyplAEs2J20eyKxSGD8iCTYf0Ii5jyyXK8DnZHybVmURA4FInZFS5g/cmg+qYg85Co1PXrnWjc+EZl8nONjHpgABZPVuXqzkugIFciv6gU98zO1gbaGFtKMDV40NDqzU0MxNd6z3X55G4btYfAzxLMMfIXQnrQsBnvx4MmwjV/1a9CijKznnsydX95t+drhy5xSMh7ofIVL7hjJES3q1nw9iSqn1Dzf/J5mpd0GRpnIeG8uQoicf7rPzYIGnnq6YhvE/kkofQQXNpicA== 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 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:43 +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:43 +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" , CLEMENT MATHIEU--DRIF Subject: [PATCH ats_vtd 08/22] intel_iommu: declare supported PASID size Thread-Topic: [PATCH ats_vtd 08/22] intel_iommu: declare supported PASID size Thread-Index: AQHaq4Bs2yEvb1zyt0O4idZ0yyytdg== Date: Tue, 21 May 2024 13:11:43 +0000 Message-ID: <20240521130946.117849-9-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: d7b47cd2-a6f5-469a-cd0e-08dc79978f4e 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?q?8LohJs0EY/r0QNI4ySFnoRxRdrrHUGJ?= =?utf-8?q?N7OpzZIhG7+MMvQMIlzCiYAGFnKiA9pDP00Q+tD5YmnEJI8vpmSyTBMC6ydK6EoYI?= =?utf-8?q?GG+mg4jNCs3jMCp6qb1bptaSBjHICjXkgqgYBUuHUi84XRlAaq+DdEbrRZbnU3kMI?= =?utf-8?q?mc/7mAK0k+E9jBr3HkiXk7xZVoInsQ5ugnRR0CrgXy+5gA1W1BMhQqN5I+cjoZk1/?= =?utf-8?q?3DzR1Qfo+iUMYWWFYDgm7fANfjW1Su0iX+95ajUhCL3eD/4cmYM2LYyZCRWIROJST?= =?utf-8?q?smo2bo/avwMKq2g9eYujICUWb5gyikH6IPeaM/RMVxmMFIZTdZ6QeBftSvaFEqMr/?= =?utf-8?q?qPy0Aop5ZQuH9SSwczUsPOH/Yk55V8w4R2NKuRgWRIfOr9KUwHIiaY7KtUXO3aJM2?= =?utf-8?q?tLMnwOzGtn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LM1mvfwHDSFMjdew=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:(13230031)(366007)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?3qI5bSnrjB2m0ocVvtCR/TysITRr?= =?utf-8?q?4AxjwsZmHEKVLZIT/sbYocusOdetISRFmD3tOnytd+GUWrE59WtRhczg7+DS8AQGb?= =?utf-8?q?pG5wafgFFjGeeSMrKmMzsE3Z/iHqkJxZk3rpe3LUt6+9/3hohgFNVxXrmmkeWh/Qi?= =?utf-8?q?zahFvyLF1oRCDwB+Wu8lMFJ7EcuWktDXK/jUbgBMDk8AAegQ/ZYzCHRjZyukoRGBg?= =?utf-8?q?iHrCqmlCCVJzGf1oI1fBQzz4qU6O+6HcnHne1ksmUePVmruJYW2RvItDXIm9NyHUQ?= =?utf-8?q?05jYUozb7yF4DuFHanvPcsGt9gI12xyodLIm5m6Zf6U9jGFMN3+Exsae047EDQvQv?= =?utf-8?q?SZ2yHQsGQOFm9S9OqdjwqdZDB8zOYFNv78sGbnKza5QuuFC+P48NB2nUFYLgjrmmV?= =?utf-8?q?1qqVcjNpXP2GNehoeTQ70y0CNOMdo0B8THP11LAPACgEKos2t1WHwFs3u8X87UfMC?= =?utf-8?q?ROlw6yYQYkKTTZgse4sav/evdEyshwX8/xanjlVou5Vg3Rg3Z0MlozgWyDq8h9vVy?= =?utf-8?q?gnNojDXqRd/8n3bLahkQoo93FvyDdbJ+KfVH2xwh9Ruv0wwGxVZ0CKr8vuqEmooRZ?= =?utf-8?q?IwoUNHZDrN6g/7WkXwl6CBx5E/qXE4iYUJxG+YWCWslYlDnuzU+ZOFOyp4GU8bG6z?= =?utf-8?q?xB3SjC9pxQd/U2iL7YRD58QwvQtQ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0RLwwKjqomuA=3D?= Content-ID: <7CE2E44260B3C64CA8DD1EFE3E8F669D@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: d7b47cd2-a6f5-469a-cd0e-08dc79978f4e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2024 13:11:43.0530 (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: XYq8OjzzHSyK12DNRmdq/b5vKWXxCJj0ECHFtMXea4YQbRfpCBVl3g1ndGlmKsw5+BLC3CltOKj0zXeVAwlgQFM7XQj8nBOSvtH4aik7q2Uqmjn1zSJRC7bFYYu9exfK X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR07MB8148 Received-SPF: pass client-ip=80.78.11.82; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost1.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 Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 2 +- hw/i386/intel_iommu_internal.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index f71c04d370..7d86a31bea 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -5838,7 +5838,7 @@ static void vtd_cap_init(IntelIOMMUState *s) } if (s->pasid) { - s->ecap |= VTD_ECAP_PASID; + s->ecap |= VTD_ECAP_PASID | VTD_ECAP_PSS; } } diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h index c9a673585f..1b0d8958ad 100644 --- a/hw/i386/intel_iommu_internal.h +++ b/hw/i386/intel_iommu_internal.h @@ -194,6 +194,7 @@ #define VTD_ECAP_MHMV (15ULL << 20) #define VTD_ECAP_NEST (1ULL << 26) #define VTD_ECAP_SRS (1ULL << 31) +#define VTD_ECAP_PSS (19ULL << 35) #define VTD_ECAP_PASID (1ULL << 40) #define VTD_ECAP_SMTS (1ULL << 43) #define VTD_ECAP_SLTS (1ULL << 46)