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?YmlGW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YezNBLBN0A/KVLEbLXdy3EtQuyqYTu9rQ2lfzSAATxPw5Lmgxqv9P3IpUXBjWJOK?= =?utf-8?q?qSMSi/s93dTSiVPobhcEaA0r1Z3Ws7uc/JXqv5kUfvx/fCEoOr3m/t5meQP+rRf4P?= =?utf-8?q?YdZovNhYZrtuXB+fEXGxyn4fkOMBQ868O+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/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Sc2G08Uy7k0MaffxEkcl/hQdxcrbVctdwjBLs+YlkmB0DSYs+mq?= =?utf-8?q?RmVqyIsxJqsxrbqTAowIuk95n3QzorQPEpaJeBaoC039HovZAaWWD1Mncsdllmula?= =?utf-8?q?uqDK4ZBIDi9+OHheQVm/0KfsTY5AHgyGADutttxYjUnWPB381UEXU1vuDnmjSTDVD?= =?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);