From patchwork Fri Jul 5 05:03:16 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: 13724414 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 0324EC30658 for ; Fri, 5 Jul 2024 05:04:10 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPb6V-0005LS-5B; Fri, 05 Jul 2024 01:03: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 1sPb6T-0005Kz-DE for qemu-devel@nongnu.org; Fri, 05 Jul 2024 01:03:25 -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 1sPb6R-0003dq-BM for qemu-devel@nongnu.org; Fri, 05 Jul 2024 01:03:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1720155803; x=1751691803; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=n+KWipWUJfWSA2mhPfNQC43RVT4lkeLpK+cxoqpKD4E=; b=VnOqRd1Lpmc7D01+DqUg8orV9wHWGyE5G2RDg39PDLVlAcyutTjj6pPk baikHeNg6wy8ILPP1WPizSaIT2TO69zT3lFmzjWmrd4l9lMcCH8TgirsH bRh1Qq6SyxdvgfBcg2Y+We/1w3CuWxAqhyfnSJU2cDDxS/JAQUxuRr1F+ iRfmqy932ypIhj602v7rFn0oYo64tw3/+dW5bGQbdeRsANx0kM+3i9tIV A6EZ0h78/kQodGkPz+ySfoN5t3vxI8WtgnVLpay7LfXJtdx7pYjw02ngZ EZk0NZwickOHref8tVo2Mx7h+uqID0g/eofzwnWbnj9qB9ReUuBpYTcMR g==; X-IronPort-AV: E=Sophos;i="6.09,184,1716242400"; d="scan'208";a="16030231" X-MGA-submission: MDGEHUwOIuPgVdBdVf16c1kNXZ42L+f3kxqHpLBabrcBpQbhj5jg0Rgy7ECm1tWpS1V6KyJzyn7DPD/xFiQm/aMWQYHdgHSK3MzEN79eLg8L2Q9m+kY9YzHEqL5f+39YNtV08440beR2BZv5EPGf/nNOIeKawb/mM4L51kxXcjje2w== Received: from mail-vi1eur05lp2168.outbound.protection.outlook.com (HELO EUR05-VI1-obe.outbound.protection.outlook.com) ([104.47.17.168]) by smarthost4.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2024 07:03:18 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OZeR8yOeCg/GnOujNsxAs9NfKuSsk/9qDxXwjxOCkZ11bALkQk+2SffCu0dSj8A2RyBr3Uk8T71gDrBpeSqeC4QP/1yN7DQDOAE80F68XhRQ+hZwLxy53XLBY3cz+c9828+tBcPkOHDP5Ynsh4suRNjw2/CJL/eIXtAnc6d5gkuM8eRaVH5JGFE2rtrhHIygebNBHGAd+wU/TAs6KaGnGetOyVvPbB4sIm1Ea12cuvConXt6efCVBE/U6atiT5OO1/a/CzchptY6RkilOyxt+ShLFPvUuTY+L6bnMe16/ctf/n2fnT0bgMxOqgcufT/MCj9RMB9jBSz1sntkbgmxKQ== 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=n+KWipWUJfWSA2mhPfNQC43RVT4lkeLpK+cxoqpKD4E=; b=axgUejzfv28JHZhnt/dwpsGSlco7/2EedyIlQ8GVH/DqPRnlaAk8AGs6YWAd/Huv83P+WleO2pDzTvu1qFNQW9Kh29lGRMf26QFzmTaEr88OgdnUyDjqSlx4oFHLPFSJdcEPLbLCl1GH2tSKnffOIpls4w/RedOOfx/X2JdGMsGAEltEqNYTnN01kVAepwmO/pVbISpOcLRc8ZKFCPGSA92785uqDrIDfYMS962EducTDF/g4ovF074zZmslLbLD6pxlIEm+eC9c3VhVv0lqP+sweRTGPiX0Ao4b6pxVilm7GDBR/4ZZ+ir9XoEIcYeXxNea7BGEEhqOUYZbHuLEKA== 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=n+KWipWUJfWSA2mhPfNQC43RVT4lkeLpK+cxoqpKD4E=; b=Sbf5drm6Ecp832cjI/tgQtbLh37hRy2bfH9p4cgeJAcQGJTwm4WWNheWuhW5CxgM8KJAjjeEGjnp5c/QyjZi1X3G8BojJGGb9IhMn7Vx5JT8W6MN825lFHALFgFEtaNpFUWma5VuSTwR/+BnS8BymorDyXgN8QpG26UJj6rrjZUfVTQP4swwVlZbvyQ+vP6Om4/+9RyWhTvn4WeXPBa2kt1f2iLqxTiCCJ0fGPXIvGmBsrCgkq2tZcMw3KinIN7rkCDPdy+uNEPrP2I0l5gOmbhO2lGH+WAT9p30mwrmslgwezpNWBd5bact0Nep0HFLR8pdMqevY9M1fmz/ekhJLA== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by VI1PR07MB6542.eurprd07.prod.outlook.com (2603:10a6:800:179::17) 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 05:03:16 +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 05:03:16 +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 v3 1/3] intel_iommu: fix FRCD construction macro. Thread-Topic: [PATCH v3 1/3] intel_iommu: fix FRCD construction macro. Thread-Index: AQHazpilPvi8AA6UY0+AS7/gkgP0ZQ== Date: Fri, 5 Jul 2024 05:03:16 +0000 Message-ID: <20240705050213.1492515-2-clement.mathieu--drif@eviden.com> References: <20240705050213.1492515-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240705050213.1492515-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_|VI1PR07MB6542:EE_ x-ms-office365-filtering-correlation-id: 91f817e6-5f3f-483c-79ab-08dc9cafc7ba x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?mVH1phwI1SCl/H4ENpG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E1Bge40uBsvQ0?= =?utf-8?q?BT6PYOvRE1xg5MRsas6Exr+Z2/RoyX5PNnaef9HIHTG71U3cpdilJtegHAv6ajFo+?= =?utf-8?q?mIjRuhRsKfUF7maM8JUHcCihPEFevMAMQm4pfoQwWQEPhfrFw2UrBuRwkfOf98N2j?= =?utf-8?q?BHODQV7jp+SUao5KmEVXsJ8w0/vF7Hh0PPwZvtrurPd3ASZrf15SGhKIa1A6gfgWX?= =?utf-8?q?lNTFyrzRpmm68X0W/hxOT2/PWTUvoTR4XvFeZGSrq5TxBdWkVeYNqZKxFUnoQWyj4?= =?utf-8?q?bp8HiBr3JPyDAjB0WDKBlkAgsw1YhHpg7hEtmzLtQ2zELHtQOeiatBU6uXNElfGzw?= =?utf-8?q?nu2++wOWXxZZbs2l00/UwiFXnZJm5QpC6y4QbmPwnZpt464v4XGvGppRTjCTXAI05?= =?utf-8?q?fwoc5/S+dBVIfe2wrUkdUuaEkmIPum3njXyCRaVl2kpdWrHvBKuyn46aW0bB2y22/?= =?utf-8?q?90DCUwSC7E9ju6YSfliuKgyj9Xc/XbjaCQ=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)(376014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?9Ws1boPcpDD93vNmg7njQrojkfq+?= =?utf-8?q?CpV4QD0jhZFNAiaLL0UfGvIBjo2G7L4OMOm8IUpUVud2aORjO0ZikeF25eIiDsicb?= =?utf-8?q?NNO8i52dZz0YmfCpiOdgvTeihT+ltQ3wjQzqskIgnqgv4pdTZszkdG0FN4Zl7mOT4?= =?utf-8?q?E/XLuhzhagoSs5fDOHgj092LBVAcOQA1SZfgzDKVF815IkDtTollGR+KW1qNX53eE?= =?ut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5RtY0OXdQmXjspA7GWoEFhfj+wLre+tLJTOI29s4WMCKWNyHX6tzo?= =?utf-8?q?ucK28xH6VKH5kxUj3r8A7dgFS3ohaWfxFtXlI2SUZUP7sXl+wsithRgdX81FW0K9C?= =?utf-8?q?LySQ8VAHvEuJRoa8FwiDGgMlaQeiS4+QLH/fMwc/Qq3spy5dgrjHw3XfobdTWd+e8?= =?utf-8?q?/izSAL4q//Dz78yBXaR9meXRugCk++suoIZQkSYfUQFxzb7KDOZGCT4lyGKk/yyos?= =?utf-8?q?zkKpMYXT9U2hPfzp0C887mrneI6zp4I5/AClSX9FEk1ljwERxGdH/Q7v33F2a4kqP?= =?utf-8?q?KqouO0AnkzzbB6CxDlQzMehWgenJMpUT41dureJKdkOHr9L42jaorUafK2ZlwkaDK?= =?utf-8?q?li0MOcKS6eLFSZSiG/KpCnM29E+guygUE9Dkr+jGta7e3uOBVQOYv6+zxXxTy5RWS?= =?utf-8?q?SduVtHFkQYScwJV45yyzZioKH4Uz2n7Al9PjXzsYnfK7cdQOSvK+5vw=3D?= Content-ID: <2544701311DD0E478C9928077DE812AA@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: 91f817e6-5f3f-483c-79ab-08dc9cafc7ba X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2024 05:03:16.3538 (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: v3wRJh1LyciE6IKtL6Y0lHkVN24JQgS03yEJuRiVo9m92U+oXaFWs8sx5+cYyxb4/zFvhgfljHqJuMyqFuJTJ4UMM6134HlX4C7za08tmHtGHg5FhVGXKVP+2qJ2B6yQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6542 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 05:03:17 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: 13724411 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 9A24CC30658 for ; Fri, 5 Jul 2024 05:04:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPb6c-0005Rn-IX; Fri, 05 Jul 2024 01:03:34 -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 1sPb6a-0005OT-Rt for qemu-devel@nongnu.org; Fri, 05 Jul 2024 01:03:32 -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 1sPb6Z-0003g3-2n for qemu-devel@nongnu.org; Fri, 05 Jul 2024 01:03:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1720155812; x=1751691812; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=8hp9YS8jEEsaaQtV+h2ko9fpqQi3pY6lFFsOK57EHS4=; b=p3RdIs1Crs+bj1U4bS0Pl7nhk7PqaLSgTyGyg6fli07HkGo0j8HXL6jU eXPa4uFHUdDdpaSUWXDD2lAlxapfQOE6HvCo7t2IfpGQ1HQmrsa5NRAHx V3t5k3XyVGCE8oKP6ik3K6fZxHySqG3SBiqiVKlEwqbsiiKvuQyYGeowU hCIAW8SidmpSL+yE0kpAPje0OhaD1QSDvMg8X127UcQOjNIhJUQQbQpTb ZZE5NKpQENIHYYUw88oCIGBI5y1e8tWUasKCdMnpfXMRHV8DVXA40Vug/ AHobaRgosiTcs/oa8eF0i9xwsW2wER0CXJM6ahg2uhOHqNZzyEMUVkpUx Q==; X-IronPort-AV: E=Sophos;i="6.09,184,1716242400"; d="scan'208";a="15924033" X-MGA-submission: MDFK+l94PiF81q8arAJRzBfErXYhlrAHhReiw2QoMg0LaEHyJoPxOLx5lBU0uJe7IPcE6P1+IAoHFJEZ8wviF9GxgzpvKd2uwBqUZZP25MrI+xFo23P2yJDZu60x7LlLBBV7t8gQlsuEq8yKWy83FCQ1sQ+wScoNAb42zPZ7jqKapw== Received: from mail-vi1eur05lp2169.outbound.protection.outlook.com (HELO EUR05-VI1-obe.outbound.protection.outlook.com) ([104.47.17.169]) by smarthost1.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2024 07:03:20 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z7/B4GHyd6Ae2kfdXDsc6KAHwgCV5v05g+FUMDvPYhcpfOJn94OJOZa9xgTicI1D01Lk150XSbbo+wRbX7fhttJEEwqNS+JVEL5xfJjWDQxXYuoPAF/nFeL1LB8oTMIfKxT01dyM7kwm8u57zCYRXoUpZnvemfQ2KvKRe9mg+WTn54Vb77ZqfsnuVhs5reshE2Ae+nKNaPcy79G+hadLxlW5yA1qwdDLihtR8qxd8kUf/YWA+tY1OkitJxSqD+W1Co5NWnn7bKDeEKapf/+O+UZ8TzM0nnv0E2HjVbXL1BsMHqVb36O5vgjI1V1U4QXiRGh539qIuHFdKXemiSaZfA== 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=8hp9YS8jEEsaaQtV+h2ko9fpqQi3pY6lFFsOK57EHS4=; b=DcLcxl8X78bvtlmv3wDi2OOJ0iM56tZ0Wq8vjrO1CUPSW5FGigPv5e0BUjex1jdZNs2HGZusdYjwnZkVOCgLsS7Ej8v0cv9YNZVBpEs3k8PiDfMatZJKPu932n+utFKzlcPa/q6ppfq63oIVgNL0cLWPdxbZeAzszh/c90hYnOqwdm/CXhWSE+t90DvFuduGLPFIyeEKV+vQDvkE5pfJaF9CGnXIpPdIVySiNWhyjPipk3c6Leum7QhEMyDriu8dvxFqqYI48wgnzwqh4GoWcRBSR+AxPsuLqRTGYFGFvxHEMyYbhf6qcdEIwOg8NCbSBG5WwUGQcqpeSj8bK4nYqA== 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=8hp9YS8jEEsaaQtV+h2ko9fpqQi3pY6lFFsOK57EHS4=; b=gx0BvnlcQP6rBSzbCCfXMu1DAJHIUojgPL9BEsy4zV1CtXSxVU6pmPOX1jA2nXpCkr9qg+miDlm6aiy3/+LUHP1K/cBu6AnxWJUSl56HjpP9KlApsi3PxMZjoLjzndWYoV82zJtPZtuqhX0Qx0NFqnK20zqQTC29z0zsxZKyBDAGLA0kVISLnt4jzUJhNQO4ZEIlLYElmd1R4f26khlCK2jCOOBvL871Nxj6Des8fIQsjH2r3Rzav4vRHHztpppQbUI4YXBJj57+pFhnQPcLsbjAS0S3HEnwWsnEoxp5Fxan0fAE1ay9ob4ZAfkjGedsIqL2BPCLK/NajLVzj5ClMw== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by VI1PR07MB6542.eurprd07.prod.outlook.com (2603:10a6:800:179::17) 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 05:03:17 +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 05:03:17 +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 v3 2/3] intel_iommu: fix type of the mask field in VTDIOTLBPageInvInfo Thread-Topic: [PATCH v3 2/3] intel_iommu: fix type of the mask field in VTDIOTLBPageInvInfo Thread-Index: AQHazpil+0mQLG18N0+TygrrlyLdGQ== Date: Fri, 5 Jul 2024 05:03:17 +0000 Message-ID: <20240705050213.1492515-3-clement.mathieu--drif@eviden.com> References: <20240705050213.1492515-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240705050213.1492515-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_|VI1PR07MB6542:EE_ x-ms-office365-filtering-correlation-id: 731a34f8-adbe-4e59-0ad9-08dc9cafc853 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?M2R9O6mB8QrvrZsM0w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LTim?= =?utf-8?q?Rvxgb661Ja+q0fGNzxXC+45LWDWp5v1iQ/cG0VrxOpemW4tqD90kpGS2+MJvot0RC?= =?utf-8?q?u5WDd51mw1zgx9PR1OoL84LG6waIpVyZMW0SQWTzrUhpVbCIF0poAhzMHFT5agxM+?= =?utf-8?q?oczZGK5Nge1CEINkl9A/sqFjjWbYvuCENZQ97p4QG5ES6H1SOexlz9OkTyBos6R3Z?= =?utf-8?q?g9mRCBQ6v8CPFPhj/+HHC5rcPGV+CNfkE970L55ps6wNXNJx1tpJ9O4Pgy0w0QxYy?= =?utf-8?q?BIfL+4tjrlPyT0J0WdM/NxSZ6NB16MdE65vbrjdU4IyHCt12EJQT35wOYzE/G+WWG?= =?utf-8?q?vYxfQJt71NPpaxe/6EDlpsMODUKg2wCQp10oon1AS2E3FFiQh4zypTCwaXYq13PMN?= =?utf-8?q?bS2yoCk5iM1qgOzS8/VGgxAHxQd4bfDNMLZXvtdoEw/PnXw/y2irdOByHyFDA5Q6m?= =?utf-8?q?+bsU/B9vZGus4GIumgwYoVuGZm4vwmUZnQ=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)(376014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?clvqWq+WpQlJKQSNH6KLZafY8feH?= =?utf-8?q?MdtEjbzEnYbMfZ84exE+Y72YKu76aHHnH7mJEH10CDSbQQq2AExPJM2wh5Lt6DRfM?= =?utf-8?q?3Cf4ZqZcJhohTtM637Pdqg1pK++MmrJExC79YA9ldGC5aO768IiNwtlv7uwVA7wst?= =?utf-8?q?nJT9iPHyaJ2DJBaaMQJ+gRNUjT8r9nKgZSQH7LyviLHT50Az2Z5BXz/GsjXRebscY?= =?utf-8?q?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?ok22eovUR/XAksRHZa4VxPTjS/evNPgTpnALSxkLs6lsdO8cg3JkMEOi6GDeKW7Wf?= =?utf-8?q?7pue/h0vi/FxHFDRLWy8KidozMM1baKTudwCTaXAC+QnFKJe3ks1IwgnANmo5FeIu?= =?utf-8?q?xtbF/h9wPt3HZMb4d+wR+g/Y1kav4wQ7trE8T6riSfR0uqx9BVJIljU+S88KYDpLG?= =?utf-8?q?8U+oMT7ybvw2ovEJ0H7098/1iM/gpF0NNyWOjVVrVgBdXBxc7cj2xlxz9gfD+gKXr?= =?utf-8?q?0DqNsodxYLln9vrr21C4U84Jk4KwS2O7RebGuvTdq0TpKK8NKBSPk1vPVXBcD9SaE?= =?utf-8?q?YBxuBYSO5GC7rGdLG2tVs51diCHLaew7yGblLU6xp9Finf4z+1ZcoOy+JPdMzJf0s?= =?utf-8?q?B3BMkdNH8pS9EFdhHY9R3J9NPhM5uov+aLlCM1CDttI7cjyJqu9clHgtPLSgxdPXe?= =?utf-8?q?gdjr7ds8LbyDRpWB4GC6DrL/dhHPhuTjO27GE5FZrpSXRIqMazR4Ack=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: 731a34f8-adbe-4e59-0ad9-08dc9cafc853 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2024 05:03:17.3459 (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: nb0D3kvg5GUxACaqOhKUEkN5EJIFXoND8P8mqC41JpiHb7fzyFw7HCndUKb8zJoWFgo8FMRTmn/iyAR52gTURNzZ0aM86QaqLUMvx9w/+MMCxxlDMPgAHJSEj9oEvUju X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6542 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 From: Clément Mathieu--Drif VTDIOTLBPageInvInfo.mask might not fit in an uint8_t. Moreover, this field is used in binary operations with 64-bit addresses. Signed-off-by: Clément Mathieu--Drif Reviewed-by: Zhenzhong Duan 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 cbc4030031..5fcbe2744f 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 05:03:18 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: 13724412 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 E6CDFC38150 for ; Fri, 5 Jul 2024 05:04:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPb6X-0005MX-R8; Fri, 05 Jul 2024 01:03:29 -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 1sPb6W-0005M0-KO for qemu-devel@nongnu.org; Fri, 05 Jul 2024 01:03:28 -0400 Received: from smarthost2.eviden.com ([80.78.11.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPb6R-0003dt-HP for qemu-devel@nongnu.org; Fri, 05 Jul 2024 01:03:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1720155804; x=1751691804; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=+vlW/HnbLcXMR2jiiiKIos58VNaFzsvBUZnsSR8WMWc=; b=c2UwBF2V+agf3SjBFf4lkJJIKedPH1dx8/goqud5n3QySXaiutg5jzpC ss07hUZJx+XjniahZlcgk5KcEtn2PGISlf7M5RxVKE5WPymQNvFo8YucR d6xthEWucyyXKcFDHnoLCsq8q7Xgzz3EZapx8fzJ0s0/G6oXUurNeBx5B umzQOdkKkAO64Oyg8TNH8srVexEoYRX3h/JNZN1opn6SweP4Fk8ySafbq wR5y3+h1tFUicqwYAY4+JFRWkMEHR4jbjUzn3ZFgGWnFh9aoe4lJ1cOLg wNM3nvO6nMywKjPZscD7rmOqXRHbZmbqy3LkPjMJdqvtZ9B26kA37+ujJ g==; X-IronPort-AV: E=Sophos;i="6.09,184,1716242400"; d="scan'208";a="15932577" X-MGA-submission: MDEVUNVIeB+2nLfWcbH5HR5ei1ZZqTvmKgKffzsv4HmSrZ40dfF3Rm8da38FIdPdgnAkRrmf4en7GlhrkwkQ7uV7gFkxXNnm0d6deElYFf6kr8JeDtYTx4s5fL2bT1HypnB3MeInEa5LfT1qJh3OmBZ7Hy02n8uPUDR1ddos8A3yaA== Received: from mail-vi1eur05lp2168.outbound.protection.outlook.com (HELO EUR05-VI1-obe.outbound.protection.outlook.com) ([104.47.17.168]) by smarthost2.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2024 07:03:20 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YlomwKmB21uWsKKaJqfW6zG4a4+OztCtzowJs52w8rTBKsHqS2y4xw7hP7BslZIpTaIWOV1ZMAgYdI7mD0e81vDPlVaNqW2KYq97AqNhqh+SFTlHPXRSFi8Q5Mj7ROomo992YA3rYmfG2jAv/outPuBxBaBA6cqtYMQPEiEgSxjE/i5+R3ajpTa4Ymm9laQjcIj04FVz9XN7W6/V0qFhce1XLyRagDmfVB/afQgbLra6hYLBhX3KQ+nCk8B+Vs7L6byeAV+P/viWJ6aeCdkFaZF4O1JnBs+bznBXF08baPW4DnkY5E3qW5kjHnvs2QfDgkNJW3X+FxND9QOYNffqqg== 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=+vlW/HnbLcXMR2jiiiKIos58VNaFzsvBUZnsSR8WMWc=; b=EicSsr0D+fCcnrJpyypDqQYJra3KYDIGstzYoBp8t2WaPeVA+yRY9svcc/8O8XSKQ8RZWZDB0iMztot8UelFve2Et6kYk6QyGk3kV2ISGCNWoXl5tPzU6z4RGe9zK1boBsaP4Vs2sx7SNERxvvWyMl/46qiOJMMUG3RiJXedRPDM3LK24ZSu8B1/98LOvFh/WbSD2/FxRwxkjCp441nFHWxnIVVakM+CAMaFQOSptP33GZGkz5cwmrwP92ZuEjBLGXukRJyX6ABoer6+3BiI5sEF/TqxFw9fj763DYTr7IJqLYrK7enx7iLEMqW4bNLNZolxjCSLLYv0HS/i0Tvr6w== 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=+vlW/HnbLcXMR2jiiiKIos58VNaFzsvBUZnsSR8WMWc=; b=os+2s7hN90coL8gbIOQQEvrrfsa5xp8u588NWQwqqMj0+z76JWziZZyoq/PZSja1XUeI6JLXiLfU8a84jSg8sfOT8B2xo7luWYqG68F/p8zaKsV5DD00hRmej/FtArPrd64SLbI1mdm+SNnCOlITYCYqSkghkcWjYd9kCby7weeLVMGUESVAUFTDJ+bLfWIK/vc+XK/VfbJkvtDAZzPJ4KBVJHLlU71nYIE9Rbp9KpoB6NwwnkKiDKsajrsBlSWaJkpA/cMv+eQRZbq+sVotY3D3OFCubLAbhxEyIr8itfAPrsYaBgkAhWxOje29bDkJLY2ajpZaodg5kIvCcyEzew== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by VI1PR07MB6542.eurprd07.prod.outlook.com (2603:10a6:800:179::17) 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 05:03:18 +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 05:03:18 +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 v3 3/3] intel_iommu: make types match Thread-Topic: [PATCH v3 3/3] intel_iommu: make types match Thread-Index: AQHazpimYumHqjSOhEagUatp7yyYIA== Date: Fri, 5 Jul 2024 05:03:18 +0000 Message-ID: <20240705050213.1492515-4-clement.mathieu--drif@eviden.com> References: <20240705050213.1492515-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240705050213.1492515-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_|VI1PR07MB6542:EE_ x-ms-office365-filtering-correlation-id: 9a1b8379-de84-47e3-947e-08dc9cafc935 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?Q0AJ0BgSpK2/WTakmr15bvgCxLscCZp?= =?utf-8?q?YmlGWEHj4v//6o7QsPMlZuLeM5sZvIOvilZFqZe0yiUs+F5C2KXoXFTPBTCDXuuT2?= =?utf-8?q?z9nYri9BtjdCo6KfsM+kOytVCQfnXzINHSSZ1OyuHSfOPvX5uSXTtnv6HgXB87wio?= =?utf-8?q?ejOJe9BgntCODnTLftZRfXWTfL0dDHZ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yn4fkOMBQ868O+yxuMhp0zJhvNxccQnqgUSD3oJ+6boIz?= =?utf-8?q?/WYU+hcCZONEUcHQWoa62gmOvQUBIGQ2bPWb2AHPYh8XXUybQZJzKIcH7aFwCuNWa?= =?utf-8?q?NPRnT6eweiPHDEr2If1jTa5NcS2Ey8Ux46qrp+1MyI5/N2WHEA+yh3PqxoWSrhNbg?= =?utf-8?q?d+ueL9EcLCbkQ2ApwWHRPowwP/S1Vt1eRNQLuIF4B/6Fa0NlwMJ5/Xob3KhKkMiFI?= =?utf-8?q?sXqsFOU7PPU0Or7bcRbhJslnaD43OkuJ8PbuJz7QRiMPHuGxAI0jERcQs56DJtXSS?= =?utf-8?q?PmFuu/o6U9wBwQTB9E3eml4Q6quqdwDyyg=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)(376014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?sJwosW64ibJExEsZ1Fcl33LNB+xR?= =?utf-8?q?dQq/FfE14iknhKZrYgpybEuC0ZzYrDa8kMAkJQegrp/RGLHi/8bgm+njSnF7REREk?= =?utf-8?q?9/LmmvF5OS/54OtPsPajIGkWfVMfDyKuLo1IpO9CJ/oaxarr00+65dL1cyPTDnyBE?= =?utf-8?q?G0cBiAvDurK2CAdfTZM2iERPku48qMIepEnLo2VLg+mW7VsV3Q5zJEMTHnSN2bqUD?= =?utf-8?q?vY/IvfD67xBURSWikucoXB4mJGV3+75KmGZVk/nTKqCdKKYC6NntDXYS8T7BTPFYQ?= =?utf-8?q?qWKLwlHDM0CjMUpWa50iW2uJxN4ukNkOoa1fdoCXnNeeJkt/Fpu2mIPLzqAFW141V?= =?utf-8?q?81zP+mKdF9DSNH4i6yj8EPb8iUVX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PB381UEXU1vuDnmjSTDVD?= =?utf-8?q?+35/AGhjykIdOgvbaWOluLF3XGqwITfE7dHhsDCad6L2BQ90tXIR/D65FpVj1fJBe?= =?utf-8?q?REBfrglv/W39P07Kjyr3ZCb1QZrl4A2iXd+B6FTrO52nfRN2JKW/D7TGvej+xRNN0?= =?utf-8?q?f4upxsMomXcy18cKtwb20eBk+HIFDzNLgJlfeck024kXmoSTnwO+avj+zU4875idh?= =?utf-8?q?hC3OGW/uaAsUYgGzM+VJiba4L+QkGytMwzFCmPOmkKOyaIzL7i6DR2J0Z5E5ksmjG?= =?utf-8?q?3OeWEBcYrepkNx5q5aOYRGp119HGATDUjrvK7kn5UbkgqslnXfPf3GE=3D?= Content-ID: <5CDF6DCABFAA834885835EF427752511@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: 9a1b8379-de84-47e3-947e-08dc9cafc935 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2024 05:03:18.8503 (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: LI5sklwAeSNQFRJ7ajsYxWZ1yhYBSWMDUZFRzQAmVqI69BAH7xrJq89L0yFImgi7u/rjj0vXp/C0vDyge+Wp8MrEqPcqXcXbOfRzedf/C7QuBEZ3wZDFEdam/nQ5vODk X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6542 Received-SPF: pass client-ip=80.78.11.83; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost2.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_PASS=-0.001, T_SPF_HELO_TEMPERROR=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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. 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);