From patchwork Tue Jul 9 06:18:07 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: 13727296 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 D40FEC2BD09 for ; Tue, 9 Jul 2024 06:19:41 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sR4BH-000101-7N; Tue, 09 Jul 2024 02:18: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 1sR4BE-0000uD-P8 for qemu-devel@nongnu.org; Tue, 09 Jul 2024 02:18:24 -0400 Received: from smarthost3.eviden.com ([80.78.11.84]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sR4BD-00080Y-1E for qemu-devel@nongnu.org; Tue, 09 Jul 2024 02:18:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1720505901; x=1752041901; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=DyEyFJrO9lIOagX6ucF6+QC5h8iiBFYHP6dorlEqKw4=; b=nGmanSTIquY+HgDXraMykscT9F+Kpdu8rbRZ48K4ZwAP4Zie0qtXYp5k 8+gY5Gu/RQPg8M3u4/PavgUwNdMYmjOm6UAnVEm0D8uU6AlqqtXNJ/XV2 mM3PfO39dc+3rz6+t+IgABumKbAkjiYRzvMYxUzQ6SkVMkIZrLSKYQS/t VJqoeHjnPJ1tihjg3Jn3IHI/Gzh9naF0IQzquQ2oTzVIVzqErCRrcnM1z Tevkc2vR2ie1DOQArfPD6/Dvdls7iaMLUkOgUQkHrUAHeEdsuWmJtGBZS 1OHIPDeX1e95hcSPNqpIBgEi+f4xVecyhGt5jBOrgnyWgovyrznFxzGFp A==; X-IronPort-AV: E=Sophos;i="6.09,194,1716242400"; d="scan'208";a="16131807" X-MGA-submission: MDHOC8HKFkZaFW9W3CvsYY44beo3RaMb5aF3jvywPKbHCqUptO4+LpUuQxJvT2koVGpecNZKW2IX7ovQNfwtF/bL0vkcvvrrOqACiFmTpJ6Gc4Vs4rex3JlJlmDEPmFfHbasw48IrxSQLZD/Yohsazc1m8gidrc23/VhPJgVSdHiCg== Received: from mail-db8eur05lp2104.outbound.protection.outlook.com (HELO EUR05-DB8-obe.outbound.protection.outlook.com) ([104.47.17.104]) by smarthost3.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2024 08:18:08 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mHgMR27dUVp6cnBvEI8vPh+NNEIspQtnvOrGUWOAAIZrLLKWkN5u50OOOp1hCQLJtVHEP+58PCO77Y3+nqYIMJ8yyOURSaFQzF77Ab6mB4O23ATU16Evylny8XnHIQ/+HqzAsHVVJRJY0AVd5C4+OWyFnR6qLVxq2bwyt7BQ6O4P4jRezFNAElmRztw8RH8y1+PMaS81GrPuycLh6K/+Yi+ACpXnAWewxOhwGmBzQvo4+TckcA6uQn373Ls0k4ZKzF4GVjXR2UI7XcYfA82K8WQqVeZyXBvzJ6+xUXJTMHnWIVjLci9uz8OUVUYyxWrzO/pRopOJnBZhdEoc6rjpnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=DyEyFJrO9lIOagX6ucF6+QC5h8iiBFYHP6dorlEqKw4=; b=ZKWhoAYXjLF0ESBW9ihEgHihAzWToktrrs7wJbmWMsvWRlGWmh86RqAnsPOlkxFml+PlnFGX1ufKla5r56nXlbj7lt3l4yinpvq1DHvSWv/0B6+AS2NNuJCqHsUuMthydta7hQfhqV7PU241g1wcGs/sMj2EdEAKVFll8cHSZyKZf4HEIkBi6Mq4SgQ0bVfu7x7Rm428DT5Edu5Ahj3fI9Q2/QCoQv53duyw3NJNvz0uIaxAR0eaHq5sxjS3nj6rgNyRhuNetSgnSn7hLKzdImhAmXYJmYn3mJDqy1i5x7Q/TlCXagna2CDfyyi6e0zASrUdpBCSAiaIKL0Kk9G9aw== 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=DyEyFJrO9lIOagX6ucF6+QC5h8iiBFYHP6dorlEqKw4=; b=VtKmnwTeXkKhobDSevVHcOH9C7Gl15p9W8sY0x0GW6yf3GdTggY9FUZeOmDJ0XZU5JiRHVFmKYXYTcApnBzoqFet/3z2LD7fqK3WtWRXuZgFyjHdvE+2oPUGpD28wRX1DBKJGIX5Z2N3ftK3rdPq0hcoKWAfzrMM6ZHTuE2Jx4mCkwIjjNx1W0Dau/Fck9urmidO2tuTC2ceRfP0f/PYIgZ4uGuZaYK0WiHfl6ubop48nPAGlI51mTMKz4i9MdPSMw0ITTUUydH8ox5pqSHpQcdyTPA+75OkZV92UTnyrl0vTMdkPxETKcaZbEo0iXqpJM6EY1wOr7tKZRtIZykbOA== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by DU0PR07MB8466.eurprd07.prod.outlook.com (2603:10a6:10:355::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.19; Tue, 9 Jul 2024 06:18:08 +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.7762.016; Tue, 9 Jul 2024 06:18:08 +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 , Minwoo Im Subject: [PATCH v6 2/4] intel_iommu: move VTD_FRCD_PV and VTD_FRCD_PP declarations Thread-Topic: [PATCH v6 2/4] intel_iommu: move VTD_FRCD_PV and VTD_FRCD_PP declarations Thread-Index: AQHa0cfEhe7Ej2szhUytlU9cUcJt7Q== Date: Tue, 9 Jul 2024 06:18:07 +0000 Message-ID: <20240709061756.56347-3-clement.mathieu--drif@eviden.com> References: <20240709061756.56347-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240709061756.56347-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_|DU0PR07MB8466:EE_ x-ms-office365-filtering-correlation-id: 7d1c782e-b4f5-4236-11a8-08dc9fdee69d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?DsDF5yBAUn8eBzGqj+rdMtwCnXrgXUD?= =?utf-8?q?4t9p0waK17GccLL7eGgJiJM0vyIC4Ni2YjaPGMuVyw+fGmiRTFpRCGNC3g+OgKANQ?= =?utf-8?q?wm68yNTMnQztGql8akrbCsHn2iRGqm921GL8fsjK1OH/HRyPsY7Qb1STxeAkkVyze?= =?utf-8?q?pTJaJ7CKECUwhHHksRphwWPGUDn3QsbN94RpRCgqkgjJ3iHE3gDJFIzJ+Tdd+TvXw?= =?utf-8?q?TszhJtQOcJAf47XFVcVSMuvwJST2xPmrfOxP73P3/DuOqT42ufj1LqNtvnpAOrLIf?= =?utf-8?q?gwUx7yEBMJqvbfmGvFdhipC1b3dDCTS2DfA/5WBDMmAP2/JWZZ6BzTWZfCYaVr43a?= =?utf-8?q?g0m4axWqiSb6CQg7kmGLrhrWdMdjgyuT/qSvXNScXn2eKm+W/B63GFAJBUxyxIJQV?= =?utf-8?q?Df9Icd+j9O6Q7rYPTSGANvaCsEtpjp1jmYJjhn/pZFai8zn7u7G5QdcBPuV/0jhbS?= =?utf-8?q?UYP54+lvbHRAKvHdNckTpkTTeMj0JyOe3TRhdzaojtD7jLtxZcyqb71QAs9muf6T7?= =?utf-8?q?LmjsMTQ6sSqsPPlQf+S9b0x9hiH4vrWGSHvQ0BzrgZ7BXV680s8hF6K16LcpjbbK/?= =?utf-8?q?AacaCAcHSQYSg/GnU8KvNE2BWSmDm5ntG7RO8YvCsJyvOQdb5IgvnWXoF4a/r2PB6?= =?utf-8?q?1O/dowlyvyzrTiZ1atawzf/+h2MfZTdPKO0REzKtBAEY9rbeRxppZMsq41lacKjMP?= =?utf-8?q?YIbR3uUL9VmutF4QjAHDNSYERcL2BmeBbNpJB5OypP7mgzzlq0nRqInj69cMf7aBb?= =?utf-8?q?EGvey01VAt8U/p0tNG76IhIYtTxBjORP3oAkjVlZwfHft7grKGkbQQapBNbI8akvV?= =?utf-8?q?L9/gHfjPprXq5RHBak3GDyoDFRbLLNgnxLmD+ntSxZ5iSPxpfRozai0htMkmZnIw7?= =?utf-8?q?U+MW14F+gDTR/3flPi7fpVgwY94zDWPqYlezqkr117lORrlpmLFzPYl6vOgFhpE1n?= =?utf-8?q?pZeD5+4+9N1UNaqNpgOZ7LfmYXrhdsu+PKbtW4zw/V6wdmv2S9MMs6DOR9AZNhu9k?= =?utf-8?q?iaY4dl99DVLdRgb6CLXL9ozvtVv4rCmSntdelETx9Xr+f6F0YSz6Vnse/u3ETtdKU?= =?utf-8?q?0DX6X5J+ORPDLZB/81qdowqxoQfDpxiHsM2v4+j7icd92AkLEd7RASWe7fKg6Pjbt?= =?utf-8?q?6IjW/E1l0/RX6Vy6cTRrH+ilbrjtIP8a1wRVmkcaH63u1ZK0CE4O34uA9kzRU3JoE?= =?utf-8?q?ZbetTEwOlyzBhbiT5iLdUqbsa5MlfyGEYGFB806XpnVgLQR/4JnNMASeVSvg5P5ur?= =?utf-8?q?TfCkLufyGI467vb06ZMuOLuoFxusuEn3CQPhsGw2v0kupCz0LffXroenXkedAUloh?= =?utf-8?q?Y8toy/bpQHiXt21iUXjPz5qxVu7P8SpiAQ=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)(366016)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?v2hpMOTLGCooRPwhXesE8lU1gsHI?= =?utf-8?q?YhncpyXToFVlNGt23dFP7b1rwn65cc+mVMW7/XYIzcxJqeshIME3rxOHDcqIRkN2i?= =?utf-8?q?nXHJiMuIqjiNjaV1iBu2DS7T/F9uPtDGtcQPudi1e7URojrbzBD3FrZcfSSktktXP?= =?utf-8?q?UsqRwmgulXsh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SPtVc9XzFEb9+ovwh0+6N11oSuCV5DYL2RR+muYsGQExO?= =?utf-8?q?utDtAJr+FiCO+caSl3yj41WS0OtkYO3DNvLwlDBBaVWUbFU1TyR3qJe5VZnm5SRfx?= =?utf-8?q?Lk1g1yPtwtQoMZV36XjDlvuffUBTPKZWkHGrGeQOaPuyj8ppKBTT9Ch/MzPVqssUH?= =?utf-8?q?8pJR4Ca4KwzxWFFHBZzLkMxQBzycxN8nBqmuyX6mT4bsx5TVI5hmLT2+OY5cybjOq?= =?utf-8?q?4Tuo5+xAED/0QzFAxIr0NTD6YUzRHbx2KAAWF+NI9Grn0EbwTJ7w7ksUKGhWYd+0q?= =?utf-8?q?VEuUVA4zVCzc+IdqhRJ44DuCWe1gky/nV5fxIcEScaU5qLnNw4b0+P80JhlsBR5O3?= =?utf-8?q?ax7eBFWECIK+ZzMhZXAyDWMQNvdh4NVulKojCLhFavgNGmSZK7nwKS4Tw5OdVz/5X?= =?utf-8?q?qj+hGZPPNvatAthMVt2VBfJNQgTKoHjfSCOd3o4EteFoBpnwZExU8t4FMCFu28sYO?= =?utf-8?q?yLe0dMLwxlSY9NkayPx1I+1+5MuuFVOOxsY+9biFIv/4TTwGSGCnIKU=3D?= Content-ID: <7DDA7387EB6BCC4AAB7D7B3D52AA116D@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: 7d1c782e-b4f5-4236-11a8-08dc9fdee69d X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jul 2024 06:18:07.9971 (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: sUnFlVozi5rQl+Hem5AquM0chwdq417ie8vPnSqMqZ7B/Wui8vCeRCqyFOPhcnEvIz/kR2RuH2VY9qUQrsAmD03jGZXh8JY5+FDd7hUNv4gHZt9DD1b2Rq3qvlxMwY/U X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR07MB8466 Received-SPF: pass client-ip=80.78.11.84; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost3.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 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 Reviewed-by: Minwoo Im Reviewed-by: Yi Liu --- 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 */