From nobody Mon Nov 25 08:42:20 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=1717394500; cv=pass; d=zohomail.com; s=zohoarc; b=LWkwZwM3rlrHOfr7wHbSK4dMZroUHnYrWeoAPFPwlDbSl8kufbZxF1dDSY0oL8n/FLItUTtOj6BF7B4X1Q08sdymtjlHnmBAQqepaxFbzo/eW3iIYLcHC1mDVvhCQ1KsNA/UWe/qWGePtcmJ9PZUMyCwkXykbqnQMWAr/rjQAdQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717394500; 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=ssYVGgT6YAfemmInJATGdFE5/0e9B+YWWRi3BUUYCtk=; b=VHM1NdH/mT1JekFIPe3YPVgXvlRqafMTVMSLGvotLw4cMmHz7thuXct8rDeGqV5lAy/qrqhJ6P45QIg3N9YOEGi/8Ee+q7TQ/btUFBGt35E1fS6f/4aa7OSGAdSPDL1JJJzfs1cWw52K25QFQQknG7Hi/LeBsZ3SejdN7+jnIik= 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 17173945006311.870006829530098; Sun, 2 Jun 2024 23:01:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE0jg-0006iv-2m; Mon, 03 Jun 2024 02:00:01 -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 1sE0je-0006gJ-D2 for qemu-devel@nongnu.org; Mon, 03 Jun 2024 01:59:58 -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 1sE0jW-00071B-Ax for qemu-devel@nongnu.org; Mon, 03 Jun 2024 01:59:58 -0400 Received: from mail-he1eur01lp2050.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) ([104.47.0.50]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 07:59:45 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by VI1PR07MB6238.eurprd07.prod.outlook.com (2603:10a6:800:136::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Mon, 3 Jun 2024 05:59:42 +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.7633.021; Mon, 3 Jun 2024 05:59:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1717394390; x=1748930390; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=ssYVGgT6YAfemmInJATGdFE5/0e9B+YWWRi3BUUYCtk=; b=RGqnhSpQcOk+e7fEyHk6q91/qIf208vCuENO9TOmGQfek/vV6J81Wa35 kAFlQBgqSCXeQwg2dYLB/LH7gnKh3+LfHxnyvIE4TH04YEZSEbuGe/X0z h98uiMY+Tk5j/2EhoWdUUlzhWToXeI6EYyxGGbJuRSL+QPjUHLWwu0ArL vHUADef3ih5Pb3eIYr/o8bSUXgK9l0s4XrrRyethxlqaWn0bs0QxLM9Ma XMrx/4ce7Kj3hN5tSJgPeDx/aliNxbD9UvM/Hu3qJ0KqRViU8+VfKlLOf QQrKGYJSpAa7eNXGPIvKB2jcbsjPkCLnczRjE4Svm8FcvRX/ENBOAllQ+ g==; X-IronPort-AV: E=Sophos;i="6.08,210,1712613600"; d="scan'208";a="13815873" X-MGA-submission: =?us-ascii?q?MDHfSbrvnbd48m/Ss7v6xjYUltpWFNnXtgddWs?= =?us-ascii?q?ji2kQW0JiSYiVTL32+xwkV34i5rjS4FpeEE/lL2O0yl3W/y3lc+ZBSZU?= =?us-ascii?q?ZBHChkbuyMoLCRYe3sY1XjKhQbwOhlU/4z1U9d/p8Xs/oXV8HZRO62fM?= =?us-ascii?q?iXK7zw9H2g0DtIGoF1dVzr4A=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d6wgPdRBzoxgEDeKxsmq40MCSIMG0psYu26U0v5iMit6ZbAdvxbVNKBkH27xzG4uD3LlQEp4deqOxI6hOuIZ7X64qFPkurzjBlxM/b0DcKXLn1eg9AGjTzaq82TjbHk84C8zqrcT7tbB/bBePVEIAfTn3VlNaurShyNjVqY5ym8eSFOlojR8sZThTN26qrkyFeVCxoeidhjEWcHGp54I2jk0vl5mPeidICTBj13HNT3MToqwlnTiCYwv27HN7KkZIGs50t7Lki2UUK1n8d1dmRBsxBZAmMIr++4q8rtXHs6+b4jFjPKbZ78VUdTLzA8onNUNKdI+GqA4Jx/LhELkxA== 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=ssYVGgT6YAfemmInJATGdFE5/0e9B+YWWRi3BUUYCtk=; b=VSFhTvIZHUnXAzqQYlEUkJUnFVToBnLZYX5nLL4xKVyYbPUKXzKzaVHx+OFbq99SAeGVOEDWzXWVEQgw5nnDDuSb/mhGCt0TaphZY0LNByNcX3pFcpee+TnCqc0Z8yKw7u0xVbtxx92IJoBJqLLcfdcuVKGuaqOx0jEAf1WATeCnxLvBrwwdDrJTskF4vZFt8wp/sNQAer9FMgMyC/ulsay8mH7ryTg8//Fl+6M29+drRg5N7W85HwutIDB8T4BkbzpofSYTPRaZR/5ihHYSWzAq56e1ZGU+aa6gdJZgx8xUROTrvLYwbJFIZBPGrAvgxsMhS7gReZEXjZx8iMJUgA== 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=ssYVGgT6YAfemmInJATGdFE5/0e9B+YWWRi3BUUYCtk=; b=OgcYkzT3TYUQgW3hlC8YkvcvVVuU2vqxvB+vUDSxLlQFBPoIPhSFfFpIm9bX+XIl7JZcL+dkjlmeq2iTj0UEWXdabU5iqwoCI9Le5Zu8zshjtKJ1+rQTcCkrAV5MBIaRG0NF+sVIBQRL7ZYsvIoF/NSKIL6xc/lUxW+btLG6aPaTBnE0hB5BNTP7dEZIj1R9inJcxCOepW/tnE9NPggurVKzlOh+RDoXFxiyHrueRNN8259sqbyPLCswS1KuJeL1Xea3Aiy40F3Cjovr6nIA998YhrBfhrSgCy8bzsugfeTMkOfKXAbSiRbnLgj2Z0piauHaU0royQx8OlGdmZfJBQ== 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 03/22] intel_iommu: return page walk level even when the translation fails Thread-Topic: [PATCH ats_vtd v5 03/22] intel_iommu: return page walk level even when the translation fails Thread-Index: AQHatXs6q1IKL+LfFkqNMBSZnISegw== Date: Mon, 3 Jun 2024 05:59:42 +0000 Message-ID: <20240603055917.18735-4-clement.mathieu--drif@eviden.com> References: <20240603055917.18735-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240603055917.18735-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_|VI1PR07MB6238:EE_ x-ms-office365-filtering-correlation-id: 9c6b18b7-aef4-4151-add5-08dc83925cab x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|366007|1800799015|38070700009; x-microsoft-antispam-message-info: =?utf-8?B?c2UwTFpzNjZaM0lOQ3Z3STRUdzQzd0RZUjJVU3BIdUlZOU1XaGNtMmtpSktF?= =?utf-8?B?RkFWNStwN2szeHJhZUxIdmJaYzNMTDBWVnhsalAyM0dKVlJjb0RoMVhKaUE0?= =?utf-8?B?YmtnajhZTDhTSmhIMkMwWkdEdk91UkxXaTBJbTgvTXNkTnJKREllRGhiN3Fx?= =?utf-8?B?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Rk9meVZDV1Va?= =?utf-8?B?V1FObjlTQkRRRHBLNU14RFpCcHRIK2FpSGNRam5oa3R6b3pRaDVnTkpLM0M2?= =?utf-8?B?OVNNeDgrbmI0bWk1VUJWN2ZrbkRhUFFmbmNZeDROQ1hJMEpSb1YwbUptZGk0?= =?utf-8?B?cHpjL3luTjhpV2svbmJiSnNiY2EzR3dHS1diSDFjTCs4SzlCbHpuK2NmZzRs?= =?utf-8?B?MVAxUzdXSnh1eFlHaURSaDNTcENlRU5BNkZiNmkzdzNFT1VFdWk2UXFnTzIz?= =?utf-8?B?NlpnMEFwdHVVQ2JGWTlSRVozMzgxenBKMUpkYXY4TmpGOVltVGhkYTJkdjhw?= =?utf-8?B?M0d6eUtYaEg1aTQ0cm5KZWFiNSs5YkZJRnNiMVN4WXgwVGtPZk11UzNSZUNl?= =?utf-8?B?R0UvR0dqNE9Pbnd6bnRBemZnNE8ydmdZcHlrZXlFbHZSMWNBRTU3NWQvWXVC?= =?utf-8?B?ait6K1ZmVlNNeC8vV0xoVHY5NVhJZjhaUmlGWWtocUpGeVNrZVB5TGYxakVO?= =?utf-8?B?WUZEekpXLzBRWmQyWGFWM2R2VFBWdGQ3TmhHTDdLajFlUkFhajBRaXVmNTNC?= =?utf-8?B?WjZKK0VZK3JMcXE2bjVqaHpNSmMwOEZNQzN0WUdORkpSdVFWOUkzZ2lXS1BL?= =?utf-8?B?ZkNlNFR3enFxMDBacWFPU243MEVDcjVyclBKOHRTb3lrRnJ3S2RXdXpSK3Qr?= =?utf-8?B?VVVvTkJqZmVYOVRjNzNBTFovRkNiNHFZRnF6ek1TRFBuR1VqcWtjWUE0c01r?= =?utf-8?B?a3FtSDhDdm9pUGt3S21Edz09?= 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)(376005)(366007)(1800799015)(38070700009); DIR:OUT; S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zRXcFB6bnRuMVJpd2xJ?= =?utf-8?B?L1htY3BtWHU0TVpPUDg2TzF0TlVRU2ZySEJEamw1NnFWYjUyc0ZkT3U0cVM2?= =?utf-8?B?aU9ic1lIM3B2eitHZDJTUHdjQmNDQVRRMEZmTjkrZE1HcHZBUVhRaUgzdEE0?= =?utf-8?B?YzkxZC9HWUpuMGkzVVZSVEZnQituMy9sc2lXTDI4N1h4Rno1cVFPSGY4RWJ6?= =?utf-8?B?bHlVN0gveFBBSWUrSFAvdU5BWmdxaVl1V21IZjZ0d0JEN29tUTIxUGdDNlhu?= =?utf-8?B?Q0RmWkxHNUtaN29GUzl0MVV6QXZ0MkdGL3VIckJvbTFjbU16bHJJWDRRcllR?= =?utf-8?B?dFYwdzYzTmNjeHZkMDlJekFDemlOeW1tZDAyNDd1ZlV2aklLTGJKRytHVkwz?= =?utf-8?B?eks1RWFVSnBmR09iZ1ljY0ZObDZTRVhneDZPOW5Kem1ra1dCVno5dnNLenp5?= =?utf-8?Q?XUZPwndcJDLT9S8VPBMf8ac=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <4924BB57B0700C42A4271F75288EE2AB@eurprd07.prod.outlook.com> 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: 9c6b18b7-aef4-4151-add5-08dc83925cab X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2024 05:59:42.2675 (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: NsG1U/Jt6YJ2Du8zFivDMbk7SyFPJG4VylDmW03X5mCWi88xNPJ29XedPSanEaL042rTSN2ZURJN5Ra7Kb8g/L9EUMx5Ik4Tizx2i+CttXlKHQbTMQTY/Xnf85KVXX4Q X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6238 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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1717394500975100001 From: Cl=C3=A9ment Mathieu--Drif We use this information in vtd_do_iommu_translate to populate the IOMMUTLBEntry and indicate the correct page mask. This prevents ATS devices from sending many useless translation requests when a megapage or gigapage iova is not mapped to a physical address. Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/i386/intel_iommu.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 908486c953..772b1cea88 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -2078,9 +2078,9 @@ static int vtd_iova_to_flpte(IntelIOMMUState *s, VTDC= ontextEntry *ce, uint32_t pasid) { dma_addr_t addr =3D vtd_get_iova_pgtbl_base(s, ce, pasid); - uint32_t level =3D vtd_get_iova_level(s, ce, pasid); uint32_t offset; uint64_t flpte; + *flpte_level =3D vtd_get_iova_level(s, ce, pasid); =20 if (!vtd_iova_fl_check_canonical(s, iova, ce, pasid)) { error_report_once("%s: detected non canonical IOVA (iova=3D0x%" PR= Ix64 "," @@ -2089,10 +2089,10 @@ static int vtd_iova_to_flpte(IntelIOMMUState *s, VT= DContextEntry *ce, } =20 while (true) { - offset =3D vtd_iova_fl_level_offset(iova, level); + offset =3D vtd_iova_fl_level_offset(iova, *flpte_level); flpte =3D vtd_get_flpte(addr, offset); if (flpte =3D=3D (uint64_t)-1) { - if (level =3D=3D vtd_get_iova_level(s, ce, pasid)) { + if (*flpte_level =3D=3D vtd_get_iova_level(s, ce, pasid)) { /* Invalid programming of context-entry */ return -VTD_FR_CONTEXT_ENTRY_INV; } else { @@ -2117,19 +2117,18 @@ static int vtd_iova_to_flpte(IntelIOMMUState *s, VT= DContextEntry *ce, return -VTD_FR_FS_BIT_UPDATE_FAILED; } =20 - if (vtd_is_last_flpte(flpte, level)) { + if (vtd_is_last_flpte(flpte, *flpte_level)) { if (is_write && (vtd_set_flag_in_pte(addr, offset, flpte, VTD_FL_PTE_D) != =3D MEMTX_= OK)) { return -VTD_FR_FS_BIT_UPDATE_FAILED; } *flptep =3D flpte; - *flpte_level =3D level; return 0; } =20 addr =3D vtd_get_flpte_addr(flpte, aw_bits); - level--; + (*flpte_level)--; } } =20 --=20 2.45.1