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: 13724966 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 78A8DC41513 for ; Fri, 5 Jul 2024 11:02:55 +0000 (UTC) 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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KNktznmKZolvY2RBGJaqu5D2dQHNFn?= =?utf-8?q?F4xEpv33sRzvsLwqAF5ZmeWun29qlYholi+lcwanyV/v5lokUizhME4/hZpoPPcGw?= =?utf-8?q?nc/OGzUqabohduOBMpJQXFD6KtxFYb39xXe3iapS3tewxnznHBwOsveSlQF42SEGN?= =?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/t4MGAyduW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0QkHBwtU?= =?utf-8?q?f1Ld+EH2Xz2kADlZV33I7UdqtkFMzihkb8rDWRsICdJELdK1YFBTQvCnje0s0NOWj?= =?utf-8?q?ZCTlD7q/Gyhr+TJRWqPQX06Hb42Tjva3oBFjz6aAf0/6Aeyf6k8QD9bwWjoax8VOy?= =?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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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;