From patchwork Fri Jul 5 11:01:56 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: 1957292 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=eviden.com header.i=@eviden.com header.a=rsa-sha256 header.s=mail header.b=KtlUg61o; dkim=pass (2048-bit key; unprotected) header.d=Eviden.com header.i=@Eviden.com header.a=rsa-sha256 header.s=selector1 header.b=Grgg6Bmw; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WFrGy5fFgz1xpP for ; Fri, 5 Jul 2024 21:03:38 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPghl-0006OH-8p; Fri, 05 Jul 2024 07:02:17 -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 1sPghi-0006NM-H4 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 07:02:14 -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 1sPghg-0001Tp-Ql for qemu-devel@nongnu.org; Fri, 05 Jul 2024 07:02:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1720177333; x=1751713333; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=pqwkHTle5zShwb1UCmzN30OIyPBuDlyHBRRNtdojXrI=; b=KtlUg61o4xBgsp771pGfLGfMsGbaUokSTYZVkFrclZjDf/0k0byce6a4 /AFQubHaejnkCAflm9AvlCPkL69UeSzmlfpzO/nFcIU3Ax1BevxjowDDe r5FckWFTS0XKR3CUvRUNIGsJHBRu+CiCgAW0Nz7mxXdRlob1Ih2eVGGVc 3qD3Sxewc3et2ShcEq8Z6ahvmyDwY5eRe4bnFeV7TmFWfCygKjXPG5Ruh lQk7SGmZTL02OxQXNOUj32/urmum4eVxcc4FTLJStm3nndkSyV50s4pW7 R5f1LDFE9w82FYMEXlht0Xqs1doxmcizaMLmDnFJI9TfwWktL6vljRXj2 w==; X-IronPort-AV: E=Sophos;i="6.09,184,1716242400"; d="scan'208";a="16056518" X-MGA-submission: MDF81VNHdETT8m7DUYm1R9HzmQbRFpR8fLT/F8LkxX/MCI2D9ADG6pHXGr2A7hQDbAasZY1S9rgG0bewF/yzzrxiDiMN4nexmTYKGyb7FyhPZZ1QgSWF58Bnp79tRMmInaGOG5V/qBUcH2KZL0uU2rEh3orgL67uNvnWFPbdWiijvQ== Received: from mail-db8eur05lp2104.outbound.protection.outlook.com (HELO EUR05-DB8-obe.outbound.protection.outlook.com) ([104.47.17.104]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2024 13:01:58 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B4rLa4Z6fUS0t6UNSRAqXF/K1V+moAB/dSv3m36onN6ScJv74vKexUsxA1IjpERdAmsmnHgwVLXDsTJifVTacNih9qhlIQL/LCVdwQsyaxvBpFl1mFK3+ovztAKEByKLfI59kuXb6tPMW56LcAeRdMQaUelXrzLbWYsMpDvWIuvDhkIbbERa27MnEo+fe+Q4VH6Y4WhtyuDhem5GUcdcRrDEfaWEiiAMqoNsFj/toSMsOIaiYLbFgLFna2Q8m5R7wHlUjAOn3rw4l0PqkXcVJCWCQ60EScPhkeeJQxF8lx4dCZ9CWoLx0Z0u5MFQpkX3RgiGCctIp8eat6KhLN8wHw== 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=pqwkHTle5zShwb1UCmzN30OIyPBuDlyHBRRNtdojXrI=; b=NSSDa9RtAqT2epk9AExU491oQ1iDF6nQdrMZ8VovPayGOuZPX0TnzNDSe5aWbphHDeQGv5P3JtEOGnMEN866OSoo+YsjxVNHnO8KdBdOCAl3UpakHtprhUGZ40IjIeg1Y5ZsIbNDXiCtlurGS0ytOwSzY54CDCgTDTDdngBXOHJof0nO0NXLYbnZUL5+RT/LDieLjIukJ+ppa+TyRhTMDjHqPFKlIz+T2IpEFULz/APvXFUCsKT9XTdEefrtyjMa7M0yIPkMsEXlgDemu4JYtjVM90Uq27/kHDTc2ROYSgT7NKapORbwbLbzPG7OE797L4Y91Z8pjUC9A04epo6Spg== 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=pqwkHTle5zShwb1UCmzN30OIyPBuDlyHBRRNtdojXrI=; b=Grgg6BmwVm7Dxp1YUghj0k+OKHaESzI5/HWL6cX3OiJ9raaCtr9t3Fn4F0bKUbTY/HQMPLzCO+AHwwibfVDn0Xrmy4i+PCbRx8OXHGwf6Ch+4krRWhGBs8Pmky4Tfyq2ky53eRlVuYwzL4Cn7gmJP7DmNglQqh7efnlwIEU8k4ONb27eDBlfevYBLqLC/IltpciJqbsRqKjMGCyRlH/1GdUV5DPrevv7NBWVgYuorfDJOR4pyHG9RSYzs4tthpgv9s25xOo/KNVWEg6Rze2iablElD9PIqF2eUaLnZxpI7i461uKy8WRoe1XwFiKEnv77MqvZeXNBZI+ViMw6cQcAQ== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS8PR07MB7303.eurprd07.prod.outlook.com (2603:10a6:20b:259::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.11; Fri, 5 Jul 2024 11:01:57 +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; Fri, 5 Jul 2024 11:01:56 +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 v4 1/4] intel_iommu: fix FRCD construction macro Thread-Topic: [PATCH v4 1/4] intel_iommu: fix FRCD construction macro Thread-Index: AQHazsrARhZLqun5JEis8sZiKlyPAg== Date: Fri, 5 Jul 2024 11:01:56 +0000 Message-ID: <20240705105937.1630829-2-clement.mathieu--drif@eviden.com> References: <20240705105937.1630829-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240705105937.1630829-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_|AS8PR07MB7303:EE_ x-ms-office365-filtering-correlation-id: 5bf0e129-ae69-499c-a499-08dc9ce1e300 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?VbEEJn6UL82cxNqR3Ba40ku1jCwJ2vY?= =?utf-8?q?rx/3wo+eVfRyEGAiJjSKrGJIRdGKWdT+FP5FKefwnCgAeqILGolaQ6i5LyqtiE6Zy?= =?utf-8?q?9roQP6WGxDKxBrQoDUjVCMm8UZrl69dAPj07yCIfnIoWWRCA+lWWLg7EdXQCJ70BR?= =?utf-8?q?E4bhK2fMSmbzyQq+3i4QAhWCb5TkXFqRM54uPEArnN1HOkql8L5mw6zQV/PUp/JRs?= =?utf-8?q?qh0UdP6W20fbdFoy1YjR4gIBCcAgHdr0CvYwfR2X2kxVfGVHYdtuQ758byTiJXV2K?= =?utf-8?q?KmGv+Xzby6rxpSDqu5ex2sUETyM/lCmkaLD6vVoMueDNBsnVuWiZame1k6Fo/oKUg?= =?utf-8?q?2yEHosEQWrv/q4HBi8mDoxMFd4wfMViUeDfv2s13JQoN8zK7JpgSq6vb2v0VFw2/w?= =?utf-8?q?clNfb3llIstI5rRXzlmdwpkxeWYEiw/hfvPyanblo3c2hA7FXg/F9QKPCnHZAovhL?= =?utf-8?q?r7zvnvDAvS8kqssinBpESjD90VaDhDABM9szZMpS3N9kSCwktck6Eadz83CnvQb7B?= =?utf-8?q?UyBIJViqOmq9VZdgNEHXP9Tzj+PP3AxCccdCE6tj2Z/U4nuy1BlvbckbR8EcISVRW?= =?utf-8?q?3Bnf95jjK7e8VhLJj6irt4B0394FnnkQv6hzkKdKQFsDY+8HjkN4Z8o+OHWyjp0cT?= =?utf-8?q?ytJ16D1877m4yw+lXM6B4VAxCO/e7xRh+3BxZ+Z24rU12c/ZuljUQXza6EjH3k+zi?= =?utf-8?q?jHelsAFq1SyiDm0zXhyqeFGN/crQe9EEhXe1p9DhxtzDPqk5A5KPZjiecXlqBmgCD?= =?utf-8?q?NgFIWOeQfQVtjpXjZ9XUFqxNioz8A/CyBIizRij1aWGrG2JonmTiSvSK9Cu/xqBG2?= =?utf-8?q?HJiaivDvLrNnUkbzK7ud6++VUv9/lCGxFm2vl0r5oiP/Wzm6uy4t2as4Q5sB+fcO/?= =?utf-8?q?3aVvZTKDd+X3ifmRzbB1iXpw0IDQnQFXNBUyTWlutM5UIYLoNvyq8ZrWSNvEeLK0E?= =?utf-8?q?HHHfyyKknSD19XbGnpfS72CJA/TTqjU5CY6FLy84jkI6aclrijdsZ/+L6/ggiJUg6?= =?utf-8?q?Jh1/Owj9mAwqWq/ejDDJSnXge1Fi80wxuNXoUU9vm0ylgYOHTVEtA0bMDE/7isX/J?= =?utf-8?q?U08ZzuNHAtk4kl94Yee0VvH+XBVC4WHA0+kIyiz2G5mA1KIeQneMlk0e2hMmCQLez?= =?utf-8?q?km8Er2d4cxi1CoVxUaEHebDFWy0/cML1AfeG+x+4mNLn2nsN6vLR5WIi+5Jc6ULQe?= =?utf-8?q?P1voinfe57QmaBhcFGQtI3fThshERpy59zcyonWSyRgoN1CNIROvOEbQi2m1/BFUM?= =?utf-8?q?9kbqRO8AsxPSOJ3+gIq3h5TYUNrGvCG9MvrHGrDGI2/UXUSpZ2qquF32CZiwqqCvt?= =?utf-8?q?mkPstMcEvMgo+9squKYflNd1K17SJDwj3g=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)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?qAa8yr84V+n3EUkGNlEijB/TxxBJ?= =?utf-8?q?P6cU2KDOH3nCTz2wWVuLWFxi8dh6YHOAVGqOj9egGCiSeIf9j37BD573qMuJGbrLq?= =?utf-8?q?692aDYIIwemVkTqG/X2xz1KoyMvrb4zKIQeqMzlM4bZ+E4wmQW2Zn8S4lhN19gOZ9?= =?utf-8?q?2KNbRJBPtg82U6DARtml7dtsC26Jm2W6FCOOPoV0ZVT8n2482f6OmcuXhDGPqfqsQ?= =?utf-8?q?EoUTKQVUpk8Wk4EXkyAdSzwxXpmnHk1fjt2N4OSVVa5pMkYa2Mtlkugj8/W2RNFms?= =?utf-8?q?CaNHahFjQI9pnguZjs1OA/HJC0/vfiBXmYa41UjppqKHaVzmXdJVW8DbjfxsZgEnj?= =?utf-8?q?3Vz+icgf+wT3D04zebTB3doo6lvmHR61eT16rkx6HU6aN527+XyCeKy/dAfQMk5dz?= =?utf-8?q?/SZckxFo8Fofnb1TCUOzsW0y2u9/4WrcNwZQZi2tyCswdunPKHqx3H6TkQi03V9tk?= =?utf-8?q?BwT5MrQyFyZpdZKYUlcQQIYi3TE63bIS5ganPCKraqwJFU6esw4O3uBMk5XwdpZmk?= =?utf-8?q?ritWl5jEI79Ig0Roniqtzhlkk2r9UtQRQAtvKxrw+KlA+DZVedYrellbwVXX0+nqp?= =?utf-8?q?urkIpnuRHVjJQMlOmGBq18r6mezOToEHe8QC5/R+pwojf7l8SyqpTDHyzPtWyEvva?= =?utf-8?q?XnD2uohUlezRqAnbpqJw7cnPf1OnXqgK8Fzfgeik/n+QQj6gukHnjYzmoZURZpHDJ?= =?utf-8?q?ZAPaB2VbXGwiBIseKM2lfDjrTfV8L3zorcDpbBQTv3j2SbwrhDzVLhaxRbUvH5hUq?= =?utf-8?q?aomlD1xzk6vgvflZ/JsfOnciigi/NC75oBnGXxjZeGjMaYf3BZrtAAPvArCKQMUW3?= =?utf-8?q?khWw2F5RZBYA8Wyc0sHvDBhkW8WndMRCxUklHqVHFSnK4SQJTA8nWDExkq1qoXlgA?= =?utf-8?q?eHBPe3irD41QuJurPpNEy2hhO8AdKjnTNJdiT508MhMudMxgKIwrAF3qUrAT8yHJO?= =?utf-8?q?KBLFujW/qdWIyRar/Qj0CP4ZSUVN6N/xp4x62OCjdr1AaxwmWrQo5tyfIfjug1nkM?= =?utf-8?q?Rkcjr2sDBdj/zr0PpqEoThd++2OMMSIKD2WXL6SUxjMogBnsGcftTf8JG3FVBiF92?= =?utf-8?q?Xp/NB9yhvnJu3Mm2hsat6qiGgczRBux8sKPJdIZY4qyqR01674weHh1phdjuXJJhs?= =?utf-8?q?6+JqSEjIEOcBG2U+Q/AUJ9Gnfc1asU4O5FReqz/TdkttGP62YCL5EdJsm2JaJJ4wt?= =?utf-8?q?CzrxBfMfk/gIYSWgwZqQobEzT0K8ohYoQBkRMDpUObSomc2I+E3leb9Z8ApMZp0hF?= =?utf-8?q?yvK89Pwkhx5TAYuG5lHjzndOGdkz0uzgqtJ/XLhoAPIon481LCTlJOr/rFuVY5/rr?= =?utf-8?q?ItO9qmoGPlfTsyGSHTtOYsicBBm28s3ibGJyKjl2w2D68SuWTgXXjvGM2v6h5Rq98?= =?utf-8?q?8wNHVFxWHYtoQyiF2bPjX5Om6d3BzzLEy0+XiVfSL5Ikp02EMJxfaYbgsjD9sR6zv?= =?utf-8?q?oXNfx+TQrMAZzCpXgZTikFj3ME5B9No0SSxFM573FibmhGt8wcel+bjQzxoAXSXAB?= =?utf-8?q?sz/vAizTHJ9mysJ49WFGP9f5VQ2coL+aVkLWX692Hb/O+SPONe04lxg=3D?= Content-ID: 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: 5bf0e129-ae69-499c-a499-08dc9ce1e300 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2024 11:01:56.9537 (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: 9C1uPOXehEW7YKHzXo4VgdMTlsM5hlWE+ZZG2vB5F8pf7IBzBvN80uQxNq1F3jw4Q/Y6gzqNKUluL+v/LLG6N5idWWVRDFT99qb0OHEk1Vmnh8uq0W21zzErNnXJ8Zh3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7303 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Clément Mathieu--Drif The constant must be unsigned, otherwise the two's complement overrides the other fields when a PASID is present. Fixes: 1b2b12376c8a ("intel-iommu: PASID support") Signed-off-by: Clément Mathieu--Drif Reviewed-by: Yi Liu Reviewed-by: Zhenzhong Duan --- hw/i386/intel_iommu_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h index f8cf99bddf..cbc4030031 100644 --- a/hw/i386/intel_iommu_internal.h +++ b/hw/i386/intel_iommu_internal.h @@ -267,7 +267,7 @@ /* For the low 64-bit of 128-bit */ #define VTD_FRCD_FI(val) ((val) & ~0xfffULL) #define VTD_FRCD_PV(val) (((val) & 0xffffULL) << 40) -#define VTD_FRCD_PP(val) (((val) & 0x1) << 31) +#define VTD_FRCD_PP(val) (((val) & 0x1ULL) << 31) #define VTD_FRCD_IR_IDX(val) (((val) & 0xffffULL) << 48) /* DMA Remapping Fault Conditions */ From patchwork Fri Jul 5 11:01:57 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: 1957290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=eviden.com header.i=@eviden.com header.a=rsa-sha256 header.s=mail header.b=Ylc+pk5d; dkim=pass (2048-bit key; unprotected) header.d=Eviden.com header.i=@Eviden.com header.a=rsa-sha256 header.s=selector1 header.b=B8e5swG8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WFrGc5PY4z1xpP for ; Fri, 5 Jul 2024 21:03:20 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPght-0006Ti-5x; Fri, 05 Jul 2024 07:02:25 -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 1sPghm-0006RA-7t for qemu-devel@nongnu.org; Fri, 05 Jul 2024 07:02:19 -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 1sPghk-0001UB-KA for qemu-devel@nongnu.org; Fri, 05 Jul 2024 07:02:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1720177337; x=1751713337; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=xQVM7ylMlGKzxRaBVpQZpqXD9KGA8oCWP93OVr5usyQ=; b=Ylc+pk5dOAcknYdpnlMcdjV51s0/TfRAWaWnaoaHVIQXbfPSPlFJqVZM j4rw4TTo616tDsFreE24LXOR0mQC3V9NtUbwT+fgz2W93wxiZldbEbeP3 nufrOtJLcA0GPDUgRPtOxngpIRDh2a/nHILWbAC5bpb6qkN8OyHeznQHT 8Axy4W2pSwiary5HM0v2KPstx5NNSMjBVP1osty7FlCjHRu0/POLxc4ht eLRItNd3AyHUEOFKADTcg4nTT/xeC43c5vwAJAdKDdAjggjk8hz35pCZU bMMtaMD2Nm/F4qEI2Twzrz1FCFoes9dMPS5zofqzy6We/sAdZZXu07OjD w==; X-IronPort-AV: E=Sophos;i="6.09,184,1716242400"; d="scan'208";a="16056521" X-MGA-submission: MDHlrUuxReAWgnVhkPvP+ginv1tq7w0+HKx/d9wOC2RId3eKO87B3D/ZT50WoMlXuTXWOWUh7g1uY2FpDU01swOk+OJHP9ZHCSl1BwJ/K50vGdop8Tia6D677mU0pD2mIhwwQiVj5C5nDK2Cp/x9yPjgfChnsq51GZrtlRoBiZsFfw== 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; 05 Jul 2024 13:01:59 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BueE5yn6X9gtbCo4d4d1Cmup23JSQuS3M7iiGT0opbra2vBFOjzXP0qw3U2G7lhxiI8nwRbGyAPP8rXHiLvL4TT3GtHBCVQfDB6IOBzpmY/3sFsgWwanKQ0gf8eLvNPa2OKDllI3rnBV7qriLyEX9kKuXxNuJ3UC3f+I6WZ2ufwL+6+4XpirMMEFxYECnsvKJCgKyi7KcDYF3GknikmqFah9bjmMzd9UBsKz7QPAxohnE6GJvZcWNMcuHl756HmPbREfzRg0BzBr4cIRyt4Bg4wi9eijof+WVmrnhaYFhF1jDOVTkWuszP4LVg/oMyTEI1Nlm6g/42IJ5mT8SgX5Lg== 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=xQVM7ylMlGKzxRaBVpQZpqXD9KGA8oCWP93OVr5usyQ=; b=XOLQeHVhwp2wqY9m6u8xj+KXN47hqJKdKHmnghDtlmqHJ3MFXpfffZzbWlWfaPftmihwydrS3rDbpBnaGt4Wqu6Yui4tUD3ydrsiV4WqDj/3mSToMolfz7UbU6gemBQfX7NgoqXYx9C62YnDXQgtt/nJItjuQ8T8OpWzZGv9sO3t9lYKg7qWFj8KU5i8CRkBGUcMFkezvnGuO8fgFw8p1mUGoooac08LuVq7jq6LTv1+MurujDhmaIw3NWEBCiWe3hfMutB/S/wLWusGPxfE3qU7sHjlXraMX/DrXjw1KrdZhZ2tMmS7R5drP0LnH6afyqh9gAJybDRlctrfueI/Jg== 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=xQVM7ylMlGKzxRaBVpQZpqXD9KGA8oCWP93OVr5usyQ=; b=B8e5swG8jr5djHO7BIa5BTfiKYF5b44tWFN3LDJkaw/ZzfnVoqvqxGbQITGOoLMwbrP6MoJ90eO5ku+MKkCFyEXicdnvcCUmARxT4oX33OpoGp0jF2l2IJEgWm/IEJgFFc8ZOfO1pvEOSwK8+oxA4Q6Wtj2FFauzIGu9dBqf2f6rwf/JAeOMgPg30njmTm7XPZnFBh7ORf0ZHXqHm8r5T93eguDXzhwpdKKTw7vy9E0OxM2LKZ9nZThI3hg6b1lFUM17Ppf8ncX7FM81PXlwOlM8/utzhERFWybWFhddAJxihXH/k8IdhRFrcplDk4LWGKlyCKk6nCAJtFBtjPkqNQ== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS8PR07MB7303.eurprd07.prod.outlook.com (2603:10a6:20b:259::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.11; Fri, 5 Jul 2024 11:01:57 +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; Fri, 5 Jul 2024 11:01:57 +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 v4 2/4] intel_iommu: move VTD_FRCD_PV and VTD_FRCD_PP declarations Thread-Topic: [PATCH v4 2/4] intel_iommu: move VTD_FRCD_PV and VTD_FRCD_PP declarations Thread-Index: AQHazsrAAk6W8c6+BUWyia/w+c4s6w== Date: Fri, 5 Jul 2024 11:01:57 +0000 Message-ID: <20240705105937.1630829-3-clement.mathieu--drif@eviden.com> References: <20240705105937.1630829-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240705105937.1630829-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_|AS8PR07MB7303:EE_ x-ms-office365-filtering-correlation-id: 7ffd236b-be85-403e-0444-08dc9ce1e373 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?WKb/gw/sDVS41L/akeuImFK0DO+A0Gh?= =?utf-8?q?4HkM/5xth0HjsiulvPCy2PasdMEDmqzyS8mr1Lfejx7C+UFBlTn/ktD0UBWRhMr6s?= =?utf-8?q?+Dh38ev8uCQFlnE1h3wQmz7fptWBrTe5AaakiCnZIwp6DPqoWyw/c/2Mljn5erxmj?= =?utf-8?q?Cf5/7rNmfHd8Shvms+8XyAJ/nfAb4GuJudBPFylb6CZERINpA5b468ixSGJcfXrMT?= =?utf-8?q?Gc3iKyS6QNbh4N6tQZO1bNnmOyi+Flzsyaa7LqsYkCzoBxwxwCNTwbjleBPbTYVJu?= =?utf-8?q?9Yp94H2RdzSPLuvELKXMoy/0EIR/Ua5LOYBEw2axwEd/OG5Wzr38UnyPYTD5Q/Fji?= =?utf-8?q?0Rn/qLNyJSstBI/vxcSfvoLooAphjgGOagwwAfJlE5tBacYuqpq49bC9hKQ7Ign9y?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aj1?= =?utf-8?q?qKPKksT+UmWS9LFjGJPZ4pywig4T/7EqQI1kbhCNvmZTikm3cZtUQ40DL1gEYot/y?= =?utf-8?q?ygQOzDfcXn25Gd3qRdFEPBU+COOHpHEZZw=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)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?MC9/4X8WTM59XDCX4w3z6XNmmCLr?= =?utf-8?q?v7o51J4M9ScF/FMwJP1UK8LNKSupc+pLWTsBT66UF6ecN5OCWz/WzrXnx1hBGxpV+?= =?utf-8?q?U2KzCXrhIG1K+xOzdmhmSFnBAlZJIF+c/6/HRbHdCBDbSil4uSBiP5atQRLbgHhzz?= =?utf-8?q?zhIwoGnJnODE4Q9lT0t+FthMzye5TS04/Iyi07YLrVB08ossbVxQayRz3trNdYagX?= =?utf-8?q?VDjUY6UvJlqRAiCkSqPG8VR7zi04MHf5qxP74FAfrYi4aC1vF8DaMnN5PSZD/Hy92?= =?utf-8?q?xdTfr/rguguwdO4iNOEIMCENK5wL5D+WGXAgtnt7HZqniMSys/W5l1rL9p9SUqlX6?= =?utf-8?q?vVu1VzUU2iX0iWapN8/xi1eZdoFqAWxldsaysOJMhZgHcqx6MH1Lebm1fVi9IvxDn?= =?utf-8?q?e4AafsGDzW5VT+dUAAeHkcdFKQUT/Ga9hwd2mL7v6hQ0qV8MhAO/nyfZ3rXFlatCC?= =?utf-8?q?PkdsWANVWS9pj6iTlW+qWRiEhGyL3u/eNLjGRnNnsQMtcrprawFQj7lTMZsi+iPWY?= =?utf-8?q?B0d/s+4VpHDp0HC2M/3QPA82fk4DZyPMQfQgVrCegPO16hXUT0fmvYrS11Y+IRPwG?= =?utf-8?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f-8?q?WOu7pIunExKQ0+iccs40DXdJNmgS0adUj0Ot+ma0dn/2urGjEww7HGvoGKv8GfGh7?= =?utf-8?q?/eKv179NlPYNq79sHkIOFVrC7ok7mephffgF5SHXgnH6Csr+0LMc/mA=3D?= Content-ID: 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: 7ffd236b-be85-403e-0444-08dc9ce1e373 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2024 11:01:57.7288 (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: nzUm602UVUBTmvyUp10C3K0hlNFdBsqDT28lWisudSIqxhEDTe0F5rcRYY4ch5YlJOPeF8nL49mJGJ/v3AaVJrdpPvQ2tt5cZe+J5RDCFG/WcaeTHQlr+iJfsX9hPcMh X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7303 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Clément Mathieu--Drif These 2 macros are for high 64-bit of the FRCD registers. Declarations have to be moved accordingly. Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h index cbc4030031..faea23e8d6 100644 --- a/hw/i386/intel_iommu_internal.h +++ b/hw/i386/intel_iommu_internal.h @@ -264,10 +264,10 @@ #define VTD_FRCD_FR(val) (((val) & 0xffULL) << 32) #define VTD_FRCD_SID_MASK 0xffffULL #define VTD_FRCD_SID(val) ((val) & VTD_FRCD_SID_MASK) -/* For the low 64-bit of 128-bit */ -#define VTD_FRCD_FI(val) ((val) & ~0xfffULL) #define VTD_FRCD_PV(val) (((val) & 0xffffULL) << 40) #define VTD_FRCD_PP(val) (((val) & 0x1ULL) << 31) +/* For the low 64-bit of 128-bit */ +#define VTD_FRCD_FI(val) ((val) & ~0xfffULL) #define VTD_FRCD_IR_IDX(val) (((val) & 0xffffULL) << 48) /* DMA Remapping Fault Conditions */ From patchwork Fri Jul 5 11:01:58 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: 1957289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=eviden.com header.i=@eviden.com header.a=rsa-sha256 header.s=mail header.b=kF8qC8Mc; dkim=pass (2048-bit key; unprotected) header.d=Eviden.com header.i=@Eviden.com header.a=rsa-sha256 header.s=selector1 header.b=VLKmbFUa; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WFrG83fwtz1xr0 for ; Fri, 5 Jul 2024 21:02:56 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPghg-0006Jx-E8; Fri, 05 Jul 2024 07:02:12 -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 1sPghe-0006I1-Vx for qemu-devel@nongnu.org; Fri, 05 Jul 2024 07:02:11 -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 1sPghc-0001TS-RL for qemu-devel@nongnu.org; Fri, 05 Jul 2024 07:02:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1720177328; x=1751713328; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=OSaq06YEpf0TE4yDv2Vg7mB2AzPZeqdCRli7T3bqPdw=; b=kF8qC8Mcl6zHFh5zGFIF8a+DMgnWj5WcVa70fHCPxVQKrxJUcW/4WF1H K98znyXKETOVm9qMueccOsb2Vv631Sj3QsC6hXU1lmb0yFc8qWtWqHE6S /O9jUR7pLoACt9AuWsjVVYUYvhAAblfaf2ZiCK6/KYZ9+POGwEhSDUgBe kynJn5X7AkZJhhTAI1qomNpdu7Sm4u3ziORtn2iHzDMOLCpI4DrZKYTJ7 o+k6v/pn8vbor/gGtIFt5vNvdI1RqXJnsQxTf2sMWGHmFjOmzAct2zbmr sfm/qquXNVEFJfDr9ANiJWCcBV1z4q9A36FZHDWBBIZA3SI/qapksnDYl Q==; X-IronPort-AV: E=Sophos;i="6.09,184,1716242400"; d="scan'208";a="15949129" X-MGA-submission: MDELdEO0ckOqF/CCJ2pgPrUNKVnLZSHeHuV81h5wCHEhM2BF3GJao2wap3IYGJYC8d9J3JkxDB9j743Slinf+FdouwRkduw1Y9xwHDNTm7gGWN8GTy6fkfOQqQrX8t7tijS0e5Pjc9WvlYABlE0D61H0g1M7zNGGDQDeWD8Crw17ag== Received: from mail-db8eur05lp2104.outbound.protection.outlook.com (HELO EUR05-DB8-obe.outbound.protection.outlook.com) ([104.47.17.104]) by smarthost1.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2024 13:01:59 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S8zARc2q0+tnaC5rOoak4mfa929Gql0NUkM1L/mRmSUMDqFiZRugYHcRx3/nHKEj9FmnI1NrY/AE7KrZSH49xVdgagLav2km6vkO8H9s3B9MQaPVKHLaSa5lO3KPGXSdR/FI+DRlcWgBaO2GaF+DBmhfR9yhpM6Bll70YBcd0ConNgMzEpGmZNjFMtizoQif+w74UHSW302tNgttvuhu/D9KFEyl5nehxNmNKnV6CNcKDFaILjbQiCfINzYDobd7bkq2B1VNGSeiwJvNgguocm4FzML8dK4lbXuxHygbvZWxNle7LFRfFIv9wS8t+peKJnVzFT9t3eni0GLVrYsioA== 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=OSaq06YEpf0TE4yDv2Vg7mB2AzPZeqdCRli7T3bqPdw=; b=hV42v3WhqiDnq1fd5KIY9imlPLcDFwMlhwOLudUwVbRYvABHfG1RsgXfcCBjosv6fZeG9h1mcygA8/bNqR4IvirQCAXVwl/UuKAieBBUhmqcjios4gYnmE2vlvbdGpk8tGVI61BimIbSdXA6uio0B9KERhYn875Jz8NbREkOYw6MF8k7QLVXFIEUUvDpml2LmBevhC3q+TAEcEgNDsi1NlTRa2JQsnr6Cdz0h6PmZYPNlZVawuP47tY115IEIqitj/4IsQI3ZyJR5ZepKXYd+T+XATZXMZrYWORSouzjF6CNgU5dYMOJ4VijholRL2eS1SFBf7QMNXk819i/oBX4eg== 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=OSaq06YEpf0TE4yDv2Vg7mB2AzPZeqdCRli7T3bqPdw=; b=VLKmbFUa5/A7lfoVX6QNRiFnS8U6SpLBZYP3FztIHiV6zvOQuTLtm1uae0R+CDK5ZbLKjZYS103+4TmYasQQWVDQPC0C2abjzhA69AYxJqk0aqqu/Aq10WEs57lEd1xRMl2mRAiIQc8gNaZm7q/fAcTcEmyxW9K4i0Lh3CVTo0kDQ0KDyQI1ywfmjGE+SkmwxwZZoUue7Ia38QJLFBl2EQagzrCz3dKrTdtdW817kACHSw+qoBQr5b2m1+YvgiWRMhXT71cqqfAp5x8GRnHT6i+cgVSViU2bUz+Jb3HNC+n2ElqC13p5U9u/axPAGBYnQNXA/+ZVX2QT+x/lwLseZw== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS8PR07MB7303.eurprd07.prod.outlook.com (2603:10a6:20b:259::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.11; Fri, 5 Jul 2024 11:01:58 +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; Fri, 5 Jul 2024 11:01:58 +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 v4 3/4] intel_iommu: fix type of the mask field in VTDIOTLBPageInvInfo Thread-Topic: [PATCH v4 3/4] intel_iommu: fix type of the mask field in VTDIOTLBPageInvInfo Thread-Index: AQHazsrBYascOMgzcUiBvUTQcBllOw== Date: Fri, 5 Jul 2024 11:01:58 +0000 Message-ID: <20240705105937.1630829-4-clement.mathieu--drif@eviden.com> References: <20240705105937.1630829-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240705105937.1630829-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_|AS8PR07MB7303:EE_ x-ms-office365-filtering-correlation-id: 7a0ef729-7e27-4a8e-2990-08dc9ce1e415 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?tmWlQe+XxNkTA5kgvJnb96UVaxarBkD?= =?utf-8?q?Y6hrkP2iR7jSwATLdodC1HRh5s3KabSAr13YkBfAJjmaLAHov+7Riyl+Z4VoVrFMH?= =?utf-8?q?XqzEdU+Sn5FKwyWaTXLDFRUSy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tewxnznHBwOsveSlQF42SEGN?= =?utf-8?q?0I+XEUY8yaoYkCtRsQmyhcjD2aQJgEQ/ytLzhFk9OtVkqT0GAnfAW4h34/kM0KpsG?= =?utf-8?q?L+vDIVR0Gt3261M3qZjvrb4YtXh7ZoWocRzsdSU86fw5MN+BOsyAx1l5w/4uk5pUl?= =?utf-8?q?3Iie36BJIIWHTsOzFd+NuX/btJkr2OStqnI5f4B97Nr0cG4QPCIWy9nFEYwdmW4IV?= =?utf-8?q?SHx0sVRItCOgnYUfRSkc/3kVa5BVco8wDIuquIxkTVuU5vTHGQLdxt/iDgxcKd6SI?= =?utf-8?q?sGpzWlaewZMMoaxpjiEsvbAYFSUK90r1p97ohRWLWkEGHDDnFh3DdShuWJqpq3Pp2?= =?utf-8?q?vZXuAuUvGoDAhJl093AgH9RIJJWuobhULQ=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)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?r5qDqPP5pWLWLHcxjxUuM49BLEC7?= =?utf-8?q?onB3pgHIjhx3DmQBi+VuVjpxPIGkoG6wBBwL9/Oa/45EkSu86Y6Tn8xnVsvXu0RNo?= =?utf-8?q?9vNW0l48LdUxnf/7jkV7bOSVH2r3HHKgv7ItGqfmFIn3e6m97jZrLraia2jAsiCTB?= =?utf-8?q?Hr0X/QGHafmYD/+k8tq3LeV94Z/dZyRLUhsDFE3u9EA/t4MGAyduW6X5Nszvv4TzW?= =?utf-8?q?CMx3x43XESk6l2O5PwsQq2jDtFN8vdjBxv/OoQIX40Y3PvlvZx7aFxVpn1eE7YIkg?= =?utf-8?q?s+mohwV02FwVd8HkwjnDYa18LiwWiJVOquAe44fzNUS4mhJfZk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k8QD9bwWjoax8VOy?= =?utf-8?q?eLls3cgh5GR+RJzdilOOrMoIDI/D+4YPffNMHaU7DfpRoJOibEcwSTIsDLykwfPBy?= =?utf-8?q?ARUsjDm/zaxrjjYkIPBQHhSMebujB3dE6Kqf/sw2iTQl4UiFOExv4nTXL9SxlHmJK?= =?utf-8?q?Fso7p0MPmEI2OQ58FUNbgirIm+aR4F3d9cTIsWVOymrqCPfRYWZVZTfFzJ7lPMxV4?= =?utf-8?q?zbVRgI5ftsS2eKEhfCPzf4C0aBJQyUU6bj1k6CZzo8m7FDX/n2UiGFsxP5mF8btVA?= =?utf-8?q?iId1y9XmR7KUwJ41Tds0yJl0z9Jy/7QTD92dn8qZdP1kJLipdJ09hucU8aGlA9pVO?= =?utf-8?q?8U/sj8yH7L4v7wUAMfByyuGLds0ScqKDHDHhJCJfbAokGLvZrSxe6So=3D?= Content-ID: <8EEA1010084F264FA4F043D3AF8B381B@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: 7a0ef729-7e27-4a8e-2990-08dc9ce1e415 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2024 11:01:58.7402 (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: wHKx/EbFjDpd4Y6ju1/wHpqV3oHUlvVrBn0K0/OJIYCAJqilVyypnMh4iUAntz41uLjbhaPpT8RtnQBoALCem3d2rWeZZheuqs2giEtpB/dGUc+SncD7sAWoAhonFPne X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7303 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Clément Mathieu--Drif The mask we are trying to store into VTDIOTLBPageInvInfo.mask might not fit in an uint8_t. Use uint64_t to avoid overflows Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h index faea23e8d6..5f32c36943 100644 --- a/hw/i386/intel_iommu_internal.h +++ b/hw/i386/intel_iommu_internal.h @@ -436,7 +436,7 @@ struct VTDIOTLBPageInvInfo { uint16_t domain_id; uint32_t pasid; uint64_t addr; - uint8_t mask; + uint64_t mask; }; typedef struct VTDIOTLBPageInvInfo VTDIOTLBPageInvInfo; From patchwork Fri Jul 5 11:01:59 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: 1957291 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=eviden.com header.i=@eviden.com header.a=rsa-sha256 header.s=mail header.b=Yk9clPNg; dkim=pass (2048-bit key; unprotected) header.d=Eviden.com header.i=@Eviden.com header.a=rsa-sha256 header.s=selector1 header.b=R07i3oAu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WFrGq1JY7z1xpP for ; Fri, 5 Jul 2024 21:03:31 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPghv-0006Wy-9T; Fri, 05 Jul 2024 07:02:27 -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 1sPghq-0006TF-Qn for qemu-devel@nongnu.org; Fri, 05 Jul 2024 07:02:23 -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 1sPghi-0001Tp-RE for qemu-devel@nongnu.org; Fri, 05 Jul 2024 07:02:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1720177335; x=1751713335; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=la8b6EsER2myyyqfK0mnc02PBu9H7RQtt1F+MmsewQc=; b=Yk9clPNgKwnATra+AZdbg/p4YN5QVltoGXVGNeLJVq8oMbKWD/x1ziI1 gvelaf2+SYbFE9E78a7qunX4GG/CCbvkpq5s2k9PTpZ45tSTSsGJYDmVU LSvVQr4yNzGSSsmZgYElSUSOSIDS35PxLJsv4fmxBGjlMYJcrzFrK3jmo nB6Id9SzaoPdE8pbTnzjyCgcNa1Z8uSCfTdU0U/LSoSJr12Kfc3dNahVF tofh2rgdlF+564bF+yHz7iq4bT/Yw5eonBclg9jaXUMSkZTadCDBe7t4h 7woyoxvwXFL4dJ5pRMHx/br9o5Go5LaRRol2XCe0CjWTV+Doae71RU5ma g==; X-IronPort-AV: E=Sophos;i="6.09,184,1716242400"; d="scan'208";a="16056529" X-MGA-submission: MDHy3uUudlM5pFoU4fo48EyQ9kstlmK1+5CpBHmNpzrvdopxkoKQyWigHf3CztWdxtzp9XsQd227AihOHmgDn0iw4aBijxMHIpePeJZYXf4eGMaHxb3buEQVOCzDYhkmwfBNvLxIXkqd44SHpHZ8ASvhooBqMUGUtTAHMGrpGjoUog== Received: from mail-db5eur02lp2104.outbound.protection.outlook.com (HELO EUR02-DB5-obe.outbound.protection.outlook.com) ([104.47.11.104]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2024 13:02:04 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WbNLgvMRDz/bzwba75+Jr6K25BNrzo4243mA7YYtZ0rSxKPpNn/s/YuEIv3N+qhIuIsb0lI/cA21hPAdGhvBcsrxC0bXWTClEo/1T1g3tFU0py+742LJJMkgW/26zMKAtmzUj74Ti0o6BFQis/SleGzx5LOJP6SILdD+M9quvjcQs1bol5Vf/ickvrN1snZMNFKTpYH2QBPtZbcNU1aoPwjy2vEgFkukRt8dq9JEQFVqt0EVx4ohBP1uQTd3rQuq1kq1mQ6yeLo2bADEJwf7QKSpU4fav/nsWtv0QO0QtCMsWN0wCcx5hJAeAVNHcjTS9cmMWk+goMRaK3w83GFjkQ== 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=la8b6EsER2myyyqfK0mnc02PBu9H7RQtt1F+MmsewQc=; b=m36D5/QAm6VmOCn08qg0+l2wiadlSOxGRqlrl1d1nTdOGkU9g8hORW9M8pyhk/QfL9Apx2F/7nWBU8nAWrEod/JE0hn2pQfDA5rHIT+2byyBv6AvnyzTjWvd+GIRh9OkKm4tB/upe0KqX694udw2cxrbPy9JAl3lGtcmm7pkBxKDV74zIfRq7vdoSiTywX8qGWz0HHhj1RqCWu9ertJsLxC/oW2YgZ213VzWuadhAumqKqbp2iRRDf9qCRlj3ilIz8LegDOrk0rH8O2LVcqPmI4aNN6jRo9r3hZDW2LWl1cMND95J8bY/2kUvwlSNrM4JYd9ye7piXm5/JO2OrOT0Q== 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=la8b6EsER2myyyqfK0mnc02PBu9H7RQtt1F+MmsewQc=; b=R07i3oAujca48BoSbJZFJHsZnkmcvpTuuX2M/trxsD7EQSqCnPDJ9fb8JwvP5J64+jSaxVcreU5Euap4JFsKdiX5vmd5/JwulV5Pdsci4vgUOxxyRI3e2z6Op6czzjQ1NHxg+1GvlfWzEmvsGZpq9vtgV6o2iNbk96vrj3akxsXdegZ4xntUdG1ACgSSU4gHJHzC5JnjM8E+X7roHtoJ7nAr/m5MrRTWRPI/vrdV1GTPr+00qJWMsWYjaklVSDKtLXSMBKkvhJSBGX47wilyNUFghUv6yCra/UwAcYhkPK3Y6kFAntOxkqXK42dryL/bewtsYV/P9K4sFbJbgBxTJA== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS2PR07MB9502.eurprd07.prod.outlook.com (2603:10a6:20b:649::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.25; Fri, 5 Jul 2024 11:01:59 +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; Fri, 5 Jul 2024 11:01:59 +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 v4 4/4] intel_iommu: make types match Thread-Topic: [PATCH v4 4/4] intel_iommu: make types match Thread-Index: AQHazsrBg81pTYUcukGJyjgjd47O+g== Date: Fri, 5 Jul 2024 11:01:59 +0000 Message-ID: <20240705105937.1630829-5-clement.mathieu--drif@eviden.com> References: <20240705105937.1630829-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240705105937.1630829-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_|AS2PR07MB9502:EE_ x-ms-office365-filtering-correlation-id: 3f7bc1ef-9fc9-40d9-1a94-08dc9ce1e47e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?ndmynvqXoIqweITtdDV6Jgakkws2S8w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hi8iHe49gIzf44db8umSmkyZVUca05SXnlEdWKZnJ0VMk+T3u7Ynq7?= =?utf-8?q?r9aiGcKurY0oVZqjEhX1G8PVgY0lpk5FK0+vdAbjT/a/qlKCZ/7/bOH3lN/sR8vHG?= =?utf-8?q?3AiPQBftJTOyk4m2SQ3ebQE8+MAtcWLQWsmHh/XL9PJdeI7v1YefYmvdikDXFkFx/?= =?utf-8?q?nam0bwYln9iYBt4kFlRZRzLHXv1oKEoomTRzlctkBSC/QDNxzwYY0P0nVJjiPpMxr?= =?utf-8?q?QPaJaAKgTAqBxr0Yec03bExTTr9fJDSWVR9I1NefTbuJIZZ7/SKMiXDMvFMtvUYSg?= =?utf-8?q?bNKn6NgLm6TPhaOK1ZhKKUifMpCDeZivocRg67U+M+HVj04NMCOwJ4CtoxMFVgBTj?= =?utf-8?q?uJYNa7PaGwkDYkurHTjIS2ct2tUMr6tcugXeGGw1Y4wbi1xsepr2XvaQfSQ5AB03w?= =?utf-8?q?mcZSpMW1lgf0xa2m09xU+OudOawhhW8Cgg=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?0soJDf6ArMWdDmc4rRx7xLAfHvRm?= =?utf-8?q?tpB2CZJT2VBllnRkisXtyfbpXSOJjkZry+cH6gIQboJ3rMaOSw/VoyySB7KhC9PQu?= =?utf-8?q?HfVKY3nSh6S90OMxOneK9wgsowzZ14Zoi3ta+SWxrVIf1w53JKpf88Zu4KHY3OL2i?= =?utf-8?q?bAXrOb+ansH+LA0uEAiFz3GqkPYaoxFv9pSnE772Ubg1fB+7MeIadDtl4RmCrm9Qv?= =?utf-8?q?/4in9Fzh29zxKrUcjbU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YOdUyr8CMupSvd/9OqAGndG1Srn8N8q8gXkU+QKBeINDx0LQ?= =?utf-8?q?6ofUTcpiYAtKlcpcxLpNSWViawCUWo7uWSNtHJO1iWpdutTPrA528ATOjqibe3r5+?= =?utf-8?q?rUK43YjA9xXIOFaGM6RN8yYzon09p+oWfWCTMTR5c4TgsVg5u4n6gtKPUrZ55RMVY?= =?utf-8?q?WVjua+f1JBKe9WMq8NXwv0SuFSgBMCLvbmgjqI9ab9z3h+nigvVDffChM1NNTnVTN?= =?utf-8?q?poI59pkPbxJaVjbaLDu6oX+iz73cuY5tY41aNLD6fGlSGF0Y+9Y/roGyDV3RfgwDY?= =?utf-8?q?dpEw/BtwxBh8869xUruM8ASYCb4P6YN9anCYo7aTGCR6DXxkHGaB9veZrZgObB+3K?= =?utf-8?q?JYuuVAn2GebQKqHnbJV/IzeSk6PI9/QqYls6VjDF8cERZjet2u9qQQjOnt0ZL699/?= =?utf-8?q?vyr5LvSLrpkLVq8MIEDY/ALWqK7mvzDhY5nYMG4k91Kx4r8kVPK10wQ=3D?= Content-ID: 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: 3f7bc1ef-9fc9-40d9-1a94-08dc9ce1e47e X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2024 11:01:59.4215 (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: 5FOMf2aYdpCjxOalsEVa8iLsRKsqjE1W72yF1iaYLmydGzb6mfDAVTiqoJBLn3CAxMEeL/X7dKBwVLgZ9pVvEvRAzKuxPNHdokU7Nqk7pQrWCirSVEO3/7T+x81CZges X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR07MB9502 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Clément Mathieu--Drif The 'level' field in vtd_iotlb_key is an unsigned integer. We don't need to store level as an int in vtd_lookup_iotlb. This is not an issue by itself, but using unsigned here seems cleaner. Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 37c21a0aec..be0cb39b5c 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -358,7 +358,7 @@ static VTDIOTLBEntry *vtd_lookup_iotlb(IntelIOMMUState *s, uint16_t source_id, { struct vtd_iotlb_key key; VTDIOTLBEntry *entry; - int level; + unsigned level; for (level = VTD_SL_PT_LEVEL; level < VTD_SL_PML4_LEVEL; level++) { key.gfn = vtd_get_iotlb_gfn(addr, level);