From nobody Mon Nov 25 07:20:29 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=1717394534; cv=pass; d=zohomail.com; s=zohoarc; b=j985CDsqZIDaifv7ZZmAIYa2mil+fuAfz8zPbg3+Ee0nmCc1SX0rqYIR1lpvQ9ryb7ck2EfZBcf7o/Esgjuuh4tVyrWYB/Wm2rwE+abVqT2sNS0SV21eAARTliazlPS5fEkJbzvHRzkFD4rpgF6D8liC6GZcGFUMGC2dfuRNKDc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717394534; 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=13GG35/z+g2/tSV3v8gmuukZxQXF5OOXbQi15tZoJ9g=; b=Lp6xeZtN+W51UUjrGUcJASCCXh4qlh++m5DLa6iUApoWUMh/RoSNqNy737ct6MzDIQnAft73JDRE6vbGQYCgFJU+zCQbNScgsgZvXKX6DbdU5w8vmZqN1+lrAZ9ytroDUKrFFKN5h7QbaHrmp/OkKXW1bRgZEpMdcwhaP80zziI= 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 1717394534034946.207160832138; Sun, 2 Jun 2024 23:02:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE0jz-0006v8-2i; Mon, 03 Jun 2024 02:00:19 -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 1sE0jx-0006uI-MH for qemu-devel@nongnu.org; Mon, 03 Jun 2024 02:00:17 -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 1sE0jt-00070x-Ss for qemu-devel@nongnu.org; Mon, 03 Jun 2024 02:00:17 -0400 Received: from mail-vi1eur02lp2041.outbound.protection.outlook.com (HELO EUR02-VI1-obe.outbound.protection.outlook.com) ([104.47.11.41]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 07:59:56 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AM8PR07MB8192.eurprd07.prod.outlook.com (2603:10a6:20b:323::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.25; Mon, 3 Jun 2024 05:59:54 +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:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1717394414; x=1748930414; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=13GG35/z+g2/tSV3v8gmuukZxQXF5OOXbQi15tZoJ9g=; b=tuP/ANJDo2OvMnNRNz6N+9RNwECzEo3QOE0XaaE07Riw+WoaS7xTRTIl MG0HsTJeWyannTxbgy6C9n5WBdUcc5liT6GDripeusRhIRTjdJ2vqU9w7 D6gTsIM/oix9E8sU0wPPFWZl9FXul6U9cA0wkpqXMRvo+DENgFR6EhqI0 e2UZlialFuSsYxE0qWojlb367VpUiSyT6Ml9PUeSEEamnb0aI/IwF6MDC y4cwsNTD1tAYbeC8ufWw50W2OJSgWzzOqWK/mi6aWhvhkqZ4niq972byD 9UJpSoCzhXvxE3T+Xwb157QTpQ0BzRwVfhimg4MKmeqFl9eqLRmmFlwJv Q==; X-IronPort-AV: E=Sophos;i="6.08,210,1712613600"; d="scan'208";a="13815891" X-MGA-submission: =?us-ascii?q?MDHyzdw5o6BKIpHUr10JNFBkkkSXiJ0e8seXGH?= =?us-ascii?q?55dTtPCVuTCef4FjXtrMW+lEZ3a579Il/V+aPmZmycfeJiPs+blvEocV?= =?us-ascii?q?f2FrTpKPFLaiR/anZMcV7a9hyYNwqxzoPt0e2OJ9dCfw5seKcju1Rg3u?= =?us-ascii?q?e032zZUMHJufrg6EorRCgguw=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AcPo2qQHQKFm6FBZ6Fa6gt9bs9bodcV/PP0vImgG6KqcO00L+f/gRa4ADNdhz0c1bTzi64M/DctfTJIwdbTTVF7Rr2nDTgsENGH4wWOjck8sw5wAdvsVmGFTWIN6fG1xmYHh5YCnJPhsErVMWM7vYSBJ/V8vmEnP39eU2vbw5/jSitb9R53U90Fb3VBMXP6FlXtysXUp5K+5rkIDz8VUNCnBTl2evtXfKxHlVPFy2J8n1NntVskFrUF2WZHLS5i9ZFLeV1pvqf4HoExKBS5jMfvMRdxDZsJ6K7ag1tfxBcF0dhLZi/uxtXwFJKrPBcDRLg0Meqk8neRDoOQs1HY51g== 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=13GG35/z+g2/tSV3v8gmuukZxQXF5OOXbQi15tZoJ9g=; b=hIhb9qGVt9/X7ZYkZ/gjlGB8qv54HF87zfRA+2acl9OpplpvtnBxUl6Dy0tnjR6JUt+ox2CTXntJKj8TW4JOPswRsXMYs9p99AgtS0U94nrv+d1HFDOzu7NqnuxBm0G6jgrjPHJzKA48fzG/Es5trq1KvsowNXZApCH7IUQBLB/FrF94XzwDe++IfSuMxPtf30p3r3ObJtYLy8fbIvfcD3vFV9Y73swGaQnvn0gtCuXkca9nkA2hpIHx8exF/O26TeaNvQc+EGSM/xiSKI0FA4XLWbzcdIpnuVFOFY1j6wgi6zaccd+fmVvZTDdHe7iXlzw1SDDM9JVmgTsm8GvKJg== 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=13GG35/z+g2/tSV3v8gmuukZxQXF5OOXbQi15tZoJ9g=; b=TJ2pv8gtPTY7v0M1dfMBA9ZHm3rpnxcSELXrymP2T0vrmcRVbRi5VSKl9SCXI+B2mo5lJu+OPVVsidWbNW4nxWivItlb78Yslsmxtv0Clv3XMqSwBF1VaEWAyOFWF81znIDyl7rMaqK1gV7kA2FVfGBi7tg6V0OwSs9bGK+0N3e2e6Cdcfxw0/arN9YRg4IwZUNq7nusIQZiGxeYE+tOQA6ewBwMTTDpO7+GWktD1Yr4+/Kkc+9QwheX57B4r2CRE2OokrkTlA6C5PS83xv1dlmq4yvsFFp8aQZZtdHVZNpUE3q+S+DGNeWD4nrj+/teCIFvvnXAL6FEgqSUftxQ/A== 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 21/22] intel_iommu: set the address mask even when a translation fails Thread-Topic: [PATCH ats_vtd v5 21/22] intel_iommu: set the address mask even when a translation fails Thread-Index: AQHatXtBNNesc+UKhU+lHqhLQmHLjA== Date: Mon, 3 Jun 2024 05:59:54 +0000 Message-ID: <20240603055917.18735-22-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_|AM8PR07MB8192:EE_ x-ms-office365-filtering-correlation-id: 8d04933a-0418-44d9-9c37-08dc839263f6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|1800799015|366007|38070700009; x-microsoft-antispam-message-info: =?utf-8?B?R09SUVFIbExicGdnRExYeldHVnRJOWVhU3dnbm8ySW1qNE1PK1laa3ZUM2s1?= =?utf-8?B?NkdVaHZhTkduOUcxbmhNclNVYU1tRWgrbU9rZ0oxeEt4RWtpZkFkNThrSTEz?= =?utf-8?B?ZW1pVHhVZXN0Q0RtUkxOdlZLZDd2VlRnMXVZRytFVTNHRmEvT0xXQVJNRVZy?= =?utf-8?B?cHJzNlQ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B?UVdXR1o1N0hZYkp0MVl2NmdpVkRpeXhpSTRoU09OY1VOTm9jU1J1cFR6T081?= =?utf-8?B?ZzY2ajVFUm45Ty8zdVdzMVNKenhCL3NvRWR5V0hKVFlLWmpqWHdVQlRlUUU2?= =?utf-8?B?dGl6cElaam9TVFpWaG1BNkNST3hIQngxQjJsSkJPZ1habzdjWkJwMmV5Rmlm?= =?utf-8?B?WlB3a2Y4eWFBMmY4TTRUK1RieWtZenYxRUhTTVg1T0d5c2N5dTVXL3k1TDVW?= =?utf-8?B?WWVid3JzVGxCMHJzR21MaVBrelQ1bnBPejdzTnhkRHBaTUk3TEVTRGduWmp4?= =?utf-8?B?MTRiclM4K2tCMDZqem1Jck4wSEdqaEoyRVF2RnEzVjdmUlRORkxSbmZIY2ZN?= =?utf-8?B?Nlc4YUFNa3lTbFNiNG8yNUxvM3h4NE1BUzhxVE5ldHlZOXRhakl2YmxoaHgy?= =?utf-8?B?d0drT0xNUFJhT01tUnpGelU4aE4vSndKU00ySFRCSWg0NGVTalY5NURWVHdS?= =?utf-8?B?UThKUDRlSWJCaTRkNHFMNHZWRnBUdWp6aDd6VFc3cWNvVlNLY1F6eGZRejBP?= =?utf-8?B?MVZGYmhDbVRLUTZzM0lIMWxxaGxCeFhuYTE5eFMyOE1NOTI4T2tBMHlOaWEx?= =?utf-8?B?ODRvNFVrYnR4Nkt2SUFWbkdERktWeDlrQzJxcHFhM255U2dZejV3aHVCMEUw?= =?utf-8?B?T1JyL3JyUzFIQm83TGMvcVlCdEZsUmNTcnJEMFJ2d0xJejAyUWQ1OGxpaGtY?= =?utf-8?B?NW9RTTNwS0NadWxId0lDdz09?= 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)(1800799015)(366007)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 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utf-8?B?QWtDVitwcmEwMEdqOFQrSTA0WkJxNjcwUXg0UzNBTFBZeTFqdHh0QTM3amxW?= =?utf-8?B?Znc3RGxnRElUSTBoelp3S0lCdDB1Zy9hZjF0ZE1vbVVRRFE0c0RhbmQrTjd4?= =?utf-8?B?SDlweXJZYUtFT0hDSzhTdEhXOXRNN3BNeVJQWm05WFpoNDRvbzh5bFgxUFMr?= =?utf-8?B?ZE82Q2RFbzZIUXRQV01FNHFZSSttMGtFZm0vQ2xkZUo3OWtTYTdDZGJNR3Fi?= =?utf-8?B?cUJWMmE5QkNHeFdwcGxLT0k4SDA4S3d0alkrNjg0dTRENVRocXBhUUdRUmFQ?= =?utf-8?B?Uy92MkRtZnpKdDhTZWd4TlJFKzRmbmxGUTJwNXI0ZmdTZXBBZUdzazN4aUlr?= =?utf-8?B?bEthbCtKMXpOUHhVdzdnQ0pPeGFka1dyOS95a2lyVlBaZlRqSU0vb3RXZStk?= =?utf-8?Q?zDJAaPI3wDAUrZXT8N/oigk=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <004ADB066C57CA4993F77BA78EC6E000@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: 8d04933a-0418-44d9-9c37-08dc839263f6 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2024 05:59:54.4871 (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: ktrGHM2nKjhCJa2F3S2gq9NNAhU0bpnFFhW1sfVviDwjT79bjUnLNICVaozwidC+VqhPextJ6xf/kMR7CXySSw87dnhwucky7/1ApQ1892+s3q5kJjAG7Giwjlip2FUM X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR07MB8192 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: 1717394535063100001 From: Cl=C3=A9ment Mathieu--Drif Implements the behavior defined in section 10.2.3.5 of PCIe spec rev 5. This is needed by devices that support ATS. Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/i386/intel_iommu.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 0f3bd5978e..1ba43f59b5 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -2169,7 +2169,8 @@ static bool vtd_do_iommu_translate(VTDAddressSpace *v= td_as, PCIBus *bus, uint8_t bus_num =3D pci_bus_num(bus); VTDContextCacheEntry *cc_entry; uint64_t pte, page_mask; - uint32_t level, pasid =3D vtd_as->pasid; + uint32_t level =3D UINT32_MAX; + uint32_t pasid =3D vtd_as->pasid; uint16_t source_id =3D PCI_BUILD_BDF(bus_num, devfn); int ret_fr; bool is_fpd_set =3D false; @@ -2314,7 +2315,12 @@ error: vtd_iommu_unlock(s); entry->iova =3D 0; entry->translated_addr =3D 0; - entry->addr_mask =3D 0; + /* + * Set the mask for ATS (the range must be present even when the + * translation fails : PCIe rev 5 10.2.3.5) + */ + entry->addr_mask =3D (level !=3D UINT32_MAX) ? + (~vtd_slpt_level_page_mask(level)) : (~VTD_PAGE_MAS= K_4K); entry->perm =3D IOMMU_NONE; entry->pasid =3D PCI_NO_PASID; return false; --=20 2.45.1