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?M2R9O6mB8QrvrZsM0wnLVh6FiIOg2lt?= =?utf-8?q?m15SwK1Wa+/AGM46/d06Lf2Dzoa9ZXnhj/g+30NvHGnZutTx/PE3cSkqJOtt0vDX0?= =?utf-8?q?Yo/cIJ42bgn4/+jzXCx3fthqtWSBfINJ8CVel8G/uP0OtFNycTGVTduVT7QnGoRqB?= =?utf-8?q?8oxsN3ECXoIj2G4Pq0f/BSQl0+V9HFZfausp6Jqy0pnNWDO45Gzo5gYOx7Rm45+b3?= =?utf-8?q?OaCBH8hXiXLovKcTDt9rMhdvdIfPSqegt+Colo4EoZSOCUytojSqrksdZdM/GNJoY?= =?utf-8?q?leGPHGvtEf1n/2YauKzutbbaGF6VU/Wua12ohTAbVHoyzqryKP5tUvC+4+kizPiPL?= =?utf-8?q?fWhA/KsePil+lE8qKHlCLW67U8GArs1NNV5xHaL6WwvEhw2RNmakvZJhPFN48H3RU?= =?utf-8?q?pRtVmcdNcPnN3/S3X1iEsa+JSQZvUUGabmOAbIH0wW29KnrnuoqxCEg971IqstpPT?= =?utf-8?q?TGKIu150IRaGHWKaKeRQipfauxRGN4V7rGKlOezsrwDgV8uhoP6p5hKrDm/rNbmAx?= =?utf-8?q?meYkm6RUQw8uB+A3/MGmV81VpHj9EpFQy2/lXFhaRUpcgfZJMDSorbvxC2tqOZbb0?= =?utf-8?q?M/HGLsWs68g/LuTRn7sR18Gyj8Joj96CDZhe+3SjRH5vw3HCo2h6yjY1Ltw3MPpPO?= =?utf-8?q?9KXheLihKTJM2vjhoOrmP72vw+kiCcOhgqEq1IaSlp+CYaAPQ6ZbBRZNWNQJ7oBeS?= =?utf-8?q?MMgKlTSrJ1/AN4aqmy1aOU15WpOquBcHuNc+6a4fKEL5R2FE9RM/YEkfEelolf97X?= =?utf-8?q?eoI0aa+kZhkDcs4LfMspvdik3HoghZnvkEto9wgvoc2CU99YEuArrNrYtyDADpIqA?= =?utf-8?q?uAn9PFheNdvXps8pkWrCG5N5JKWnYZSkRPcHJNSCeu2eK3CqWYTt2+zlUfnnVLTim?= =?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+gRN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Oi22WAW98Iy4HYXIv6lsctgmHFjPDQUJ5LIA5DLl?= =?utf-8?q?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;