Message ID | 20241129074332.87535-2-clement.mathieu--drif@eviden.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org> 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 2B3A3D6EBE5 for <qemu-devel@archiver.kernel.org>; Fri, 29 Nov 2024 07:45:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tGvff-000802-IH; Fri, 29 Nov 2024 02:44:11 -0500 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 <clement.mathieu--drif@eviden.com>) id 1tGvfU-0007y7-6C for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:00 -0500 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 <clement.mathieu--drif@eviden.com>) id 1tGvfR-0002e4-St for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:43:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1732866238; x=1764402238; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=j7ZhHAc3M7mChDH3124zBWgd3jo5et1QNZwivcfTjKs=; b=mXMbeHenmze8uT3vbIUzR5vKe42a/5ZX5+Yks73kc0tMxN8t1UloStYn rtzeqHT71ZTHVQr6UmCoFjsyTWSYgKC87WmSxSImFe5jQs55yhWqDfhso Mo4Z5vW6cWb0+X9l7KAsaSpo82EChNyWnf38rc4SyasR9qtQM/Y5lNXWw Eg1ty1GYlEoSZHddMgStrL3ZDTodB+bFVNLRr8I8VcgmvIHZa86mJnPY4 bMN5k8KQFh0XriXnc0ZTi6qx9Fvzf8MElD6+MW0WH6Wvt3eFjbTLc/kKt Mn/Goef5lHxGIYnbgc+aG3cVLOrEwFonHSwBiUiRZG1L2DzGGqBuelv/J Q==; X-IronPort-AV: E=Sophos;i="6.12,194,1728943200"; d="scan'208";a="25664396" X-MGA-submission: MDHfmMeb/1qzVUA+P//DOF0EIzToYCvs9+YJJq67RVZvclHk6lBbayvLv37sgQQd1u4tlMLa4sIxO2NCRNZR5O6Nb/jNpeS1z+R7+xzfXkZpdf9eCS9BtZ0TAWlmP4eAlokWp6lKYzD8z/s4zzbfVx5zdtyhVkHivnyHGsf9lCMX6g== Received: from mail-am6eur05lp2105.outbound.protection.outlook.com (HELO EUR05-AM6-obe.outbound.protection.outlook.com) ([104.47.18.105]) by smarthost1.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2024 08:43:51 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x+VPZnsfwBsDjmDYsLhX2eh6bd4Tst0YMrueFwaqtHjktDyT5pc7dcf7tF+iAAoo4+Oqn50AvCnOO7WiVYwV5bDZ0t+MhyByLo4noqMRmrNVfyHYMxSOjp8c7vCBjC0ygUxJ5sJ67imHplfTvlTeoP0kwX4v+Ij+XUIGoDgEkuTSZs69AKzn8R34qFqdxi/Y09MUxBXXX0prubpqiIloxw5G/E5BLEhUP9quFIP9ZKMV9cgNoj0V2vMuEWbbMBnJr5qPlWQkkr77o5yyvXtGKoEiLzF9W6m8D9vsftVBa5B9fGdPQ/tBqRKIwizTuvwqLaKIdx/rmI7YCz0En2D38w== 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=j7ZhHAc3M7mChDH3124zBWgd3jo5et1QNZwivcfTjKs=; b=KulmbskJyRGtyWNckqlTRvLgjhTUo1ofN9ejLK9NGe0xZniE5oeEQ7v19tGlihvg257xLfkVprBawZUs6pbIb0kAiiBxxX+73vLsCx66D5r7LidIBBg9QpnhbG7G0kuMIo6VA8hmk7ubOjgqgCyS9LxIVAjc9EwBVW2AGCAVFDHQ87sTx6NkzKkn8tcKzgzd/GKSe0QkgG1fCMZL9OTA0/RzYtEFNMuA+Axfpc/0jymsvOxF/uCe8j+Ig3LF5te8DeB3OBNvYD2paHUUfJ+XCUJwFiH5HcFi/7mVKISHncsQoJ2wD5DKXRBU099AqxCgZpoq5V0qaMePZ7ci41WIxg== 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=j7ZhHAc3M7mChDH3124zBWgd3jo5et1QNZwivcfTjKs=; b=LfLtD0K4gFBQIFAqdBT4HnOaYf69/GcgPOd3EV1RqpIPxWtdGhuTIVIcDKHS+8YHmnQTWMa0ds/U05EK2xIByniG0uR0uYB9C8kYmCRj1RCOaA4rPSDpMg426cBEFJShJfzfgqgf86O+dVaqMn1RXyf9VqplQmsFh9aA7xAckQL42nk2xac+HZxtVVH1ykjH7/sftUFI3+ogCjJrhq1kQ7yBRm9cLv5SUKWjYEfsSOuAYSky5nxD7Q2E+UCEBJGfWlz2t7vD5sGHPb6Hjrf1icbScMEoTDw5hhsqPcAbR8gOyVIJaRn2sz+qwNcOIUCyOvX7YxdwRgbHziqW3ESg6w== Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS8PR07MB7847.eurprd07.prod.outlook.com (2603:10a6:20b:39e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Fri, 29 Nov 2024 07:43:49 +0000 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d]) by AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d%5]) with mapi id 15.20.8207.014; Fri, 29 Nov 2024 07:43:49 +0000 From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com> To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org> CC: "jasowang@redhat.com" <jasowang@redhat.com>, "zhenzhong.duan@intel.com" <zhenzhong.duan@intel.com>, "kevin.tian@intel.com" <kevin.tian@intel.com>, "yi.l.liu@intel.com" <yi.l.liu@intel.com>, "joao.m.martins@oracle.com" <joao.m.martins@oracle.com>, "peterx@redhat.com" <peterx@redhat.com>, "mst@redhat.com" <mst@redhat.com>, "tjeznach@rivosinc.com" <tjeznach@rivosinc.com>, "minwoo.im@samsung.com" <minwoo.im@samsung.com>, CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com> Subject: [PATCH v1 01/19] memory: Add permissions in IOMMUAccessFlags Thread-Topic: [PATCH v1 01/19] memory: Add permissions in IOMMUAccessFlags Thread-Index: AQHbQjJt58lDGQrBW0y9U9llBbaxQA== Date: Fri, 29 Nov 2024 07:43:49 +0000 Message-ID: <20241129074332.87535-2-clement.mathieu--drif@eviden.com> References: <20241129074332.87535-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20241129074332.87535-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_|AS8PR07MB7847:EE_ x-ms-office365-filtering-correlation-id: ae535b29-b2d1-4b48-29ca-08dd10499063 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|7416014|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?96zZKaa80y29OXH/7xVw/YRPZiEk3dU?= =?utf-8?q?6+BxxjloT4divaGBiC7UpS3MVRl0uGHBqp5O3n+ASKBRxp1JF+N+FQFbRcRMBTQY6?= =?utf-8?q?3jKFGaqi1+pMSVqbuFXeoxG3oxSxifHc+7zvvCfLK3k5i1qw108DfKVUdr9Bjoq7p?= =?utf-8?q?s9JwWFC12uO0E1z5ycnAvQvtz03SBSZEz9dq5PtPx+0rA5rcFbbrkpl85HLuXRYeZ?= =?utf-8?q?qpS6dZuwojryLsecT9lVIIs5RBzjdXza6+unI5q3kIC1nUDw57n6TEBnHBFDChtFn?= =?utf-8?q?2PHtTZXx8aCvab9i/mILnbi1dk4iDYqVivotGW5ThDxYgyqjVo1DlQVIaaO+Kq6P4?= =?utf-8?q?YRZ4Dd+hEt6DgzQgKIZoAlvpAu5NDjTou0EAoqxMvLFXIOoW+xSZZdTTn4nFrpIaC?= =?utf-8?q?PNDAL6HUOdEtN7mgppN6WnuW113pPJHtWml2p136z6rZz4zsDzSVHQM7EnPGVY07B?= =?utf-8?q?KRsaBgcB5Bn9mLuBPydrqf9iJxdzk2ldGS/+I1rGUDj4f3Akogxrxvm12188ZBWfR?= =?utf-8?q?y1jArwAWUwgsxYaiRFL2UK+Bq6xDQX6qwRh3KeP7pJfjNB/6ROFYUln4pTU3sDJjd?= =?utf-8?q?2mRWhhnrb5gsFxnInv7I8Wc+io3a1vClsdZwmCcbkWfLmdXovTceu1x31XeqCTZR/?= =?utf-8?q?sRBOQ+PoJHBoeGKDrscZFygBkzmEVIEstBq1aee2cVXcYSHu3E81vdU8zDamHYDr+?= =?utf-8?q?I6JIq1V5fnRSguVF0Z/NvOM3NUNgnEOGVY9Ypg0R2iNjta+4pAY5FBSYHMiEH2Bpt?= =?utf-8?q?cbmffMTgFt4ujpNO4F6TTZ0ydZkWstF1v5M88EbxuVPSDFcBD+6u8NdSSUfUEd8wb?= =?utf-8?q?DHwupv5uWdBk5rr5oMBJX4WmMF9ywDcR5VVGOUAM1JUqHjhQYZBrvr/RcsnEcJHw5?= =?utf-8?q?E/FgUe2OOn0oQaPHHY9xI+NXZtSsktL3K6E4F+Pf1kAVFsle7ZTXhEXpxjm0L6sZ2?= =?utf-8?q?rJ7X/dXy8XOVEj1FTb+N5PiRR7m/AQA3cXJc8MSplfP8cwJnuLR/aIwYjb+rELdH/?= =?utf-8?q?uLCVXmW+ni2YLuWO7PhWIKJspnPI45AY3VAZbUdIzM4VbWk6MYuiR/OZs1PI5IJ9q?= =?utf-8?q?m4XdPKlZntkFCvnuJWROYSrfk6YC+yXZe3V6F0ieqB/1FWKn/3GeLi+eBdZPBoa9h?= =?utf-8?q?q/mOy9PUM/Xw3AcossRmsc9ATaoeAPFQ+sxy/EFIDHry4EAbp7MhL2pyBPwGNxD4W?= =?utf-8?q?3vgejoEmvZfSb+4h0+bgU/aHcRKEXK/L3KBsquwM54EAPWeRqtKWNeqg6eEKu7xiC?= =?utf-8?q?to4h3nbE7SjLwkUJwZMEnfOCBe/6g93p4u02vuCmiR/S4m1ndaFkEsS6+sK+nY0UI?= =?utf-8?q?rJ4aRgjBjFTR7D3aSwUOT15HdPjWoIwD/g=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)(7416014)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?RPTqQK9+iLIn1NQPXOWUze2d+g7C?= =?utf-8?q?Coxup8xAoNNZ7MbioYZ6zturrljsO69zqjLQs8XjcO2o3ihBRoZtf3f9DT3QPutdL?= =?utf-8?q?6MLgNyBIm+9cRgLQn/hm0WKcqzH1QrMHP+PYrWeVV1iOVPiR7fQogza8KcaG50tkq?= =?utf-8?q?9Qx3aexEXoT7Vz+8HZupUDcNFH695fb9OPne8/o1XMEUyDuUIOSZIlgwekqw0B773?= =?utf-8?q?ev7gQX9Xll4GvFdi1aQdc+ik+fN3HLaYTU+jYdpLMTEqhWnE7eMKXGfMmbREMt+ya?= =?utf-8?q?KqPSDAlLKQ4fi/HU2L+yqkQt4xuF9UuIR/M7JDYvehmAmzbA7GtqMcYt+5kpfSgkF?= =?utf-8?q?CQBg8MbgF6PTw/+Psa7FrW0mPNo4xpeY32WVDRuzRT1EHTvKg86RsB7iXucWrqTkh?= =?utf-8?q?Kl5LEfMzOuXSCKnl07J1awNaf98lwffgC3+4s6tKb6YYbmN9niFFfLMIGMVjsgHCk?= =?utf-8?q?PryipRUrdWqhbShL/dvbZ55PFccmWl83QbkCWEs+nftsRZK2N5f5AfDconT9VVgyQ?= =?utf-8?q?weqU658jne498X6mxCLNYNB75+sYt6QX9roX5UvnnA+2mNQVQHmNWOH+IDxiNy7F0?= =?utf-8?q?76QxI167fKkLP9zVlqaztjU4vkenRqFKIK/uJEmpJQPzNIspG95LPU0Z4XIXXeJCA?= =?utf-8?q?nCWsWBvPGCfBvE/ChkqskbdD2FDi84wuCK1Pkpu8xp7uT+l5dD3szalMKR2zyx+7e?= =?utf-8?q?PNlXhx/S9Cqu3i2ueIceX5rBTt9kpRxTNOLYX+NTny+9IR0+nSpkdAf3DDUGZ2WDK?= =?utf-8?q?SF+NGbSdtDQLYpr8rl5QH24gTbPirdqtNtSEc290GvU5jsZxLZVcA3+X3Qcuyl+2L?= =?utf-8?q?+u+8qW6NWfZRU9yC0CZlYxcmC4uNdiiF6JF3XTh13iN7uRHYZYB+nZask1rK3Gatf?= =?utf-8?q?SLor0DjYRWBEZgyANNj2JTSEEUKj1oTl2HbTAA5fgzG2BH78R9hvcJxHvBikSDUBb?= =?utf-8?q?8xQZ9DzKYNzGAU6OVDScIrz3JZWimUjkCPKgUaEO6m5q+kPJSX+t8bOPJLhnnUOnb?= =?utf-8?q?x6Iv1DfqjTWbHFQcF/e7hwsYkGfohbzMWNeNndwVVl4uUHo+r+wdIvI2MmHH7fLdA?= =?utf-8?q?DcB59ZO4oZgK/ADy+yTNXdMK5hFR8eUGzysZM3Ba9gcrg9cr2lpmiGDVqi1kB5ZeZ?= =?utf-8?q?dBvwby7r9AjUryKLB5q8+uXDy+UVb3hwi2HT8A8YCkNQ7k418WczUFqmDLBpqsAPD?= =?utf-8?q?9W7cqrRThlWcc6s784CILBH6ed6pqOiRnfoeD2ae+Q2hIR5PTUWPSjzftWOIvIzlh?= =?utf-8?q?WZJoAIlrVssXO714K7leCqVOAWvtBwrCFrdBbvSIuARDYCYw7tJ2EzehSN6yS/ycg?= =?utf-8?q?PLlVIp7wVavW5I3tCQ6VzduCBCMy2U0vvdl3QHr+AZjonFFQ2yv31rDQdvLApKWGA?= =?utf-8?q?UilQgzfCLxkc8RwcW2J51yn56lZnj/dS+aDcCFwgIlipol2R5Z9QQXNg6t4rpHQfs?= =?utf-8?q?1PiipGbD7igeUAYjeVkzcTVxYA412RCEvQm85ntCAVUmETe790Q8FURfHW7YAIXnk?= =?utf-8?q?AKJ9bg7KnLGCwtlYkVohvr9RFnMFCP7a4k9hAYTeniXw7VLUVTz/JyA=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <AB6CA8109A36444FBDEADD65C82DDF30@eurprd07.prod.outlook.com> Content-Transfer-Encoding: base64 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: ae535b29-b2d1-4b48-29ca-08dd10499063 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2024 07:43:49.7194 (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: N3xJXIPf8Vum8nyOxaX9+rs4CohzDFOradIvmQwckAQikSJea7o+G1WHDOVSdEn81SCwFbz5hrQX39PN4loO1xc87bF8oQRbmDtXXeZYzwMtrUm2VfSWu4xaGwaVnsg7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7847 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org |
Series |
Rebase ATS onto lastest Qemu mailing list state
|
expand
|
diff --git a/include/exec/memory.h b/include/exec/memory.h index 9458e2801d..15fff69432 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -110,15 +110,34 @@ struct MemoryRegionSection { typedef struct IOMMUTLBEntry IOMMUTLBEntry; -/* See address_space_translate: bit 0 is read, bit 1 is write. */ +/* + * See address_space_translate: + * - bit 0 : read + * - bit 1 : write + * - bit 2 : exec + * - bit 3 : priv + * - bit 4 : global + * - bit 5 : untranslated only + */ typedef enum { IOMMU_NONE = 0, IOMMU_RO = 1, IOMMU_WO = 2, IOMMU_RW = 3, + IOMMU_EXEC = 4, + IOMMU_PRIV = 8, + IOMMU_GLOBAL = 16, + IOMMU_UNTRANSLATED_ONLY = 32, } IOMMUAccessFlags; -#define IOMMU_ACCESS_FLAG(r, w) (((r) ? IOMMU_RO : 0) | ((w) ? IOMMU_WO : 0)) +#define IOMMU_ACCESS_FLAG(r, w) (((r) ? IOMMU_RO : 0) | \ + ((w) ? IOMMU_WO : 0)) +#define IOMMU_ACCESS_FLAG_FULL(r, w, x, p, g, uo) \ + (IOMMU_ACCESS_FLAG(r, w) | \ + ((x) ? IOMMU_EXEC : 0) | \ + ((p) ? IOMMU_PRIV : 0) | \ + ((g) ? IOMMU_GLOBAL : 0) | \ + ((uo) ? IOMMU_UNTRANSLATED_ONLY : 0)) struct IOMMUTLBEntry { AddressSpace *target_as;