From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3462AC8303D for ; Fri, 4 Jul 2025 19:40:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D8086B00B7; Fri, 4 Jul 2025 15:40:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3884E6B00BF; Fri, 4 Jul 2025 15:40:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B2F46B00B7; Fri, 4 Jul 2025 15:40:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id EE1996B8067 for ; Fri, 4 Jul 2025 15:40:09 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 8D57CC010E for ; Fri, 4 Jul 2025 19:40:09 +0000 (UTC) X-FDA: 83627598138.20.FB9126F Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf15.hostedemail.com (Postfix) with ESMTP id EAEF5A0016 for ; Fri, 4 Jul 2025 19:40:05 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2025-04-25 header.b=PKoaf80I; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=i2FqkPBy; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf15.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1751658006; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Zy4z0OlNEpGYIJLSL+3zETHC6QfqhsDtOFF7nfUyZOw=; b=h/YYQulovJMrv+Q3waD9mGlX7tQwZQqiN4s82J7EPvJ1ofVGm/YDE0yEx47uMNuU83Is3t h2sIPKZS+0+wW1O+VcMhbYg0hQVfP/KBjYk3C5ev5WtsRr5pnjyxPZ2V3EQjdcmTIEE2Zw 6kpUBjpV34gXB1RcAMDoJJkT34Osmpk= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1751658006; a=rsa-sha256; cv=pass; b=7FSYg7ijo4QJ6K2WgkqoYK1ksoSGzibxvIrYGBr7gE3JPcP3hYOh1HHiGmEE+z1Zt3a5/V bR+v4fvp+SJBW2taXk4Xfyv4UHeRu5c1fABfQuTVhsoNUEHK0Oh9fAWjRcRp65TaWgf+IW dvPpAk2XjO8F1x/+DJIaqhoM1JPrp60= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2025-04-25 header.b=PKoaf80I; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=i2FqkPBy; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf15.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 564HYtsc031544; Fri, 4 Jul 2025 19:39:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=corp-2025-04-25; bh=Zy4z0OlNEpGYIJLSL+ 3zETHC6QfqhsDtOFF7nfUyZOw=; b=PKoaf80IbCg15fq9H4KQlkIfVvhJ+xGX8O rTzXEo1dELTmQoF/g8POSKYGKtOhrhOj6quhMSF4kFBf2Nh5LKTxOuYwdtsLESla SM6CUWFq1jJ/BAwWXqNHLGRNebEM70BGKiOrQi2H4acCZ10+0bxDs37dDSwh9xrD lHaOnsw5Eh3fERtvc3mEWAzBI2qp4V3/oapkt215dGkIW/s6nEIOoijUPWsN37rw Hb4K+sX27cRE6nGRPTkSCUhqbvdR3b3YGp1HMMCUsnetGnMZwlqfvMVa42+7BSID J2iE8dsA9MLoF4qq6kdizNUPStn/XGBC0wbC0peyuJ8eDcYRYwTg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 47j6tfk2u3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Jul 2025 19:39:50 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 564G7KJw018857; Fri, 4 Jul 2025 19:39:49 GMT Received: from byapr05cu005.outbound.protection.outlook.com (mail-westusazon11010008.outbound.protection.outlook.com [52.101.85.8]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 47j6ue29ut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Jul 2025 19:39:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=feZmA5ymxojfdN+npAlk5lt1PpxxanTWm5nScFwPe/zk9GDgCfqTAe4Terki2o7rK2tk6L1klICU2QgN79PoHjHFiD7MQYGBg6uMxudrSK23X1phb2DQI6KX+A51eZyuyibQAWGBRZ2yhQ0dSKicNCOZrLQqAii+2t8OD1KroRLaX4x99n/BsZKuxoyxBh8EoV2GtBWM0bD2fwfZV5p4gpqb6vLM/xv8kZZ+WL0XEBOq6MddZ6A0dQ3OKnSdPIBDZl57xI7CGJ1ueCBtvHkSsRZtJ8XWGiHHNlPAfnxU0bYPAjSzVaiQuuXnZAvsrkdnY02/3YqP7SyJ2kz/2RRSbA== 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=Zy4z0OlNEpGYIJLSL+3zETHC6QfqhsDtOFF7nfUyZOw=; b=lLe8Ny9gzOBizcqlbDMEiiGroff+i4p+4omxz60cbHkqFPU9yNmbs7jzWNoVMoSUa3j33vqP84G1w0oU/CUpomtUz4feFn5IUIeXguZPSUBXGf1nHxI/EyRV/8FcoF9KEg+nhqZbPli9E/kr1zAVSwSaQCV4uZkLnjW+G70EaBjIM01sDZfjuCv0fWoNKn/Y4ob6Ysn59tcCBXDhu/d5f8iGBMjTinz2/kuu1m/YGxN5lRW3FIty/cvr23Iyf217LdTmSdvPfSjxp1H4LVfazjlXNIAfU+5pPd1BGg6uiCastE/aTsUtvo7RTZH6Jaq05YDaBEH5VtPyeq41/FG/Ug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zy4z0OlNEpGYIJLSL+3zETHC6QfqhsDtOFF7nfUyZOw=; b=i2FqkPByckXuu/yg3tvQ3q6BITcFr41YX65QGZnaTIiGM3d1d/j0BXe+1XQrmEoNRSKj0QRkEhUKTosnGoDx8AwXNEfYLxwMwgPSlpLp+34V6mf2SlPnFlQNL6vSfTTiWSeuPsbPYcQG0Rq214C5YGRCoXcxp97Ta7SLmAwTg+c= Received: from PH0PR10MB5777.namprd10.prod.outlook.com (2603:10b6:510:128::16) by DS7PR10MB5055.namprd10.prod.outlook.com (2603:10b6:5:3a9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8901.23; Fri, 4 Jul 2025 19:39:46 +0000 Received: from PH0PR10MB5777.namprd10.prod.outlook.com ([fe80::75a8:21cc:f343:f68c]) by PH0PR10MB5777.namprd10.prod.outlook.com ([fe80::75a8:21cc:f343:f68c%6]) with mapi id 15.20.8880.015; Fri, 4 Jul 2025 19:39:46 +0000 Date: Fri, 4 Jul 2025 15:39:32 -0400 From: "Liam R. Howlett" To: Peter Xu Cc: David Hildenbrand , Mike Rapoport , Nikita Kalyazin , Lorenzo Stoakes , Suren Baghdasaryan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vlastimil Babka , Muchun Song , Hugh Dickins , Andrew Morton , James Houghton , Michal Hocko , Andrea Arcangeli , Oscar Salvador , Axel Rasmussen , Ujwal Kundur Subject: Re: [PATCH v2 1/4] mm: Introduce vm_uffd_ops API Message-ID: Mail-Followup-To: "Liam R. Howlett" , Peter Xu , David Hildenbrand , Mike Rapoport , Nikita Kalyazin , Lorenzo Stoakes , Suren Baghdasaryan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vlastimil Babka , Muchun Song , Hugh Dickins , Andrew Morton , James Houghton , Michal Hocko , Andrea Arcangeli , Oscar Salvador , Axel Rasmussen , Ujwal Kundur References: <20250627154655.2085903-2-peterx@redhat.com> <982f4f94-f0bf-45dd-9003-081b76e57027@lucifer.local> <289eede1-d47d-49a2-b9b6-ff8050d84893@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20250510 X-ClientProxiedBy: YT3PR01CA0107.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:85::20) To PH0PR10MB5777.namprd10.prod.outlook.com (2603:10b6:510:128::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5777:EE_|DS7PR10MB5055:EE_ X-MS-Office365-Filtering-Correlation-Id: b1c56313-129f-4ec5-5abd-08ddbb328822 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?sP+qsePI/+PxPsqqNthyfv7A2dFBFRLfsfzi9gwYrWpZbihxgrKbyxNwH1RO?= =?us-ascii?Q?8zb/B1rioY8rY06sk7aDYw+E4+l5WFnGT8GLIy5908gddH/g7htBqbpOWhSq?= =?us-ascii?Q?9RmGPiTnhS/KVu4gFjpp6J0JIn1KgD5idDRt9QPPUR+rlfx3gsFpvOCsUyUh?= =?us-ascii?Q?Y47d7OBGnExayaHON1jKPyGtXy3W7EXFVytgipZXAwPgsGYMhMb9b57GYaan?= =?us-ascii?Q?y3xx6F1AGc6LmSFlLmUR5Z1vivR4aRWM5SYgJnVcQUmb/8XsWiLTjawRNVI2?= =?us-ascii?Q?joilIfIZxDQu7mXwgWLum3rjh2RyfLSL5s6yWbHAptucVPDjCairU9xVK4aR?= =?us-ascii?Q?gZ1yj85gxS9h0u3AmsNdl+PwM51quosjvp7KSPQyrSvvBh9oDlJiEnpowKH5?= =?us-ascii?Q?hX0ykhAd4GiVQEX7lsapeZ5MQz0nP0NcYBnyc7W4mHNFBfB4F9bSoJ2CMZKU?= =?us-ascii?Q?CUXKWg/nFpOuxeZPGS39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?LCKmAYQsBoCQOJh/6iFr9iBgi1DgZ+CLnOgfcZoJ9wSunRzMmdmTd0olFbZO?= =?us-ascii?Q?QT+v/T3l7fc=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5777.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016)(7053199007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?FtnrgXD+gmLL6CSr+nc2U5RB2NTUz9wLTSZqwzDdg07rqhkdBrq/dm276goz?= =?us-ascii?Q?H4sYf8lQc4GUoPQxqSM5QBHDLaMHqHLvd00i084zpuCtYwM6JjN3Kchl3h4I?= =?us-ascii?Q?hhtWfqi4UP7/jts/Zd7kagVF3dqhdIVZ+pr5tzM7Jc/HEPKchgoBkA/WSzIr?= =?us-ascii?Q?NBlqRmWkI5zLWyFjmAVizK/C3ZwJAjvjD/sZ5k2hSn8vbvm+wtCR+hVQ4t5f?= =?us-ascii?Q?QfKY9W8rzZWyC36Zz8sZTtB53tm6L9fxRN5/O0Ln5M1S45gyEfcz2WsJIU/M?= =?us-ascii?Q?SPA1/CW12nU2Uw3NlWA9SagJf2bQkIW0sj01joEb5phFQHP/URuoixtmE5Sd?= =?us-ascii?Q?Qr9tkj7eFeaVFhS5HNSxjQ7oAXt8fjdSencta+uDdEBTr3Zs6xLKYYikOai4?= =?us-ascii?Q?z9lhk0WT2mUBizlxjatEuDna5OgTx3SPuwUdVgXP2Z5qXsvtDQo8kaz0cjbP?= =?us-ascii?Q?w7vDuWNVXWTjsIi8QjrdBEy3Cc1+4EUtWSU5ThoOmkhkWaip3FQEzIq5EyNK?= =?us-ascii?Q?PxnmCl9/N94sJCnMf6tlmvNSqT5W4GKW8Jmz4Oy9M5XtYscA3WhtSwFnhSQe?= =?us-ascii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A1TzpltwmBfq7TcnVyS8?= =?us-ascii?Q?DIcoeV7ooqRpbrthHipaTvxO+Fzhz07HBurNSRpL0VwQGFDyrgUwbFa8qxKM?= =?us-ascii?Q?fsKwFCp6bhzYfgNoNiOz9kUmeUilOfp+IKoxkKhC?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: roE6JFrwIuz6mHpVvWI35gVW/oqGmnP+oS+MeJKe4/YsBe9RETnw+zG59SUw1ISPJpExZkidIeOKJA+NQk6f20RXIaAWZ9jQtkytyO+OovYDXb6J8qDZMSdAh1n1iSS6ilWm6HcyXrq95QG2Ye4e8BJCe9RoghlqPTuBqPWuzu8oBkdqjZrx4F34O6a9pdQjIUww2ckFT6ftMWhwwF7839UVEit6GERdVVocH3+St7jEiULv3D3dPqaJ+2dQCo4g/8L2BDdtP8yXM1f96uDGVls4Jf7lOvCpwUiI8tQrtj62Mr6lBRywZN5lhuaGXzFao2YsgJeyKMX3no7pb4SUHIGcMeGmoFXi2FonIGhRnPvSk52U0hxeLPLkkC1B3KT99AhfkDLnrGphHl96OJznHwMTap7dhADPn+e6jvn/VGIQqQW93VynG4MDoQjcmBIreT2ceVSTQfqOCkpGb0+5VeUEUIoaHzjZ/j5oPSCyzYtwOBNDOM9ZOE8ikH/+xmCzgc5ss7OcR/6mfMSElwRikKSHO+JdAHiMSuRXHknD45h1mhFt1L0H6Xj7ZwNFeqUPq08Bn5BzCZ22mUu0YXSmOLzu+IaeAcYN2iNg++U3LjA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1c56313-129f-4ec5-5abd-08ddbb328822 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5777.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2025 19:39:46.5941 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zf0TYFdPzjTYEQROvLharJh8DyK7nBlOH7W1zR5kNxItiXv6tJtfMCa6m83LXk6V1+Qgg70euEwuFDSqt6OabQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5055 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-04_06,2025-07-04_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2507040148 X-Authority-Analysis: v=2.4 cv=CMMqXQrD c=1 sm=1 tr=0 ts=68682e06 cx=c_pps a=XiAAW1AwiKB2Y8Wsi+sD2Q==:117 a=XiAAW1AwiKB2Y8Wsi+sD2Q==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=GoEa3M9JfhUA:10 a=VwQbUJbxAAAA:8 a=COk6AnOGAAAA:8 a=20KFwNOVAAAA:8 a=Zz6nxsBoSOZYNeXGPrkA:9 a=CjuIK1q_8ugA:10 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-GUID: t7elIdN_dQTS4cyzQIkGR3v_Z0ysNbs1 X-Proofpoint-ORIG-GUID: t7elIdN_dQTS4cyzQIkGR3v_Z0ysNbs1 X-Proofpoint-Spam-Details-Enc: AW1haW4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RTt9VDHM2vqFi+SaWkTlQWeOKaEZesF22hzSEnsd3YoiMYP+WNSXDFDxBBuwMjb5KZvLLqrs9njHJIyJGIGg7i1SlvF7WhHZSnIwdShX8oSIN+yT6poeyTZ6TFf1i92/QQ9JFO2hPuB0tKi7xMh7304ZLWYWJ552YE3Fd8BHXBPzpicEnakYqJNHlI+zhPUOtL2ghUiCA8yVI/aPArbZhoj5n42TcRgk1MFas7LEvYhyCMQ8PGmaOP1rBFxkOMe7Awrwa/UTG7smF0J X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: * Peter Xu [250704 11:00]: > On Fri, Jul 04, 2025 at 11:34:15AM +0200, David Hildenbrand wrote: > > On 03.07.25 19:48, Mike Rapoport wrote: > > > On Wed, Jul 02, 2025 at 03:46:57PM -0400, Peter Xu wrote: > > > > On Wed, Jul 02, 2025 at 08:39:32PM +0300, Mike Rapoport wrote: > > > > > > > > [...] > > > > > > > > > > The main target of this change is the implementation of UFFD for > > > > > > KVM/guest_memfd (examples: [1], [2]) to avoid bringing KVM-specific code > > > > > > into the mm codebase. We usually mean KVM by the "drivers" in this context, > > > > > > and it is already somewhat "knowledgeable" of the mm. I don't think there > > > > > > are existing use cases for other drivers to implement this at the moment. > > > > > > > > > > > > Although I can't see new exports in this series, there is now a way to limit > > > > > > exports to particular modules [3]. Would it help if we only do it for KVM > > > > > > initially (if/when actually needed)? > > > > > > > > > > There were talks about pulling out guest_memfd core into mm, but I don't > > > > > remember patches about it. If parts of guest_memfd were already in mm/ that > > > > > would make easier to export uffd ops to it. > > > > > > > > Do we have a link to such discussion? I'm also curious whether that idea > > > > was acknowledged by KVM maintainers. > > > > > > AFAIR it was discussed at one of David's guest_memfd calls > > > > While it was discussed in the call a couple of times in different context > > (guest_memfd as a library / guest_memfd shim), I think we already discussed > > it back at LPC last year. > > > > One of the main reasons for doing that is supporting guest_memfd in other > > hypervisors -- the gunyah hypervisor in the kernel wants to make use of it > > as well. > > I see, thanks for the info. I found the series, it's here: > > https://lore.kernel.org/all/20241113-guestmem-library-v3-0-71fdee85676b@quicinc.com/ > > Here, the question is whether do we still want to keep explicit calls to > shmem, hugetlbfs and in the future, guest-memfd. The library-ize of > guest-memfd doesn't change a huge lot on answering this question, IIUC. Can you explore moving hugetlb_mfill_atomic_pte and shmem_mfill_atomic_pte into mm/userfaultfd.c and generalizing them to use the same code? That is, split the similar blocks into functions and reduce duplication. These are under the UFFD config option and are pretty similar. This will also limit the bleeding of mfill_atomic_mode out of uffd. If you look at what the code does in userfaultfd.c, you can see that some refactoring is necessary for other reasons: mfill_atomic() calls mfill_atomic_hugetlb(), or it enters a while (src_addr < src_start + len) to call mfill_atomic_pte().. which might call shmem_mfill_atomic_pte() in mm/shmem.c mfill_atomic_hugetlb() calls, in a while (src_addr < src_start + len) loop and calls hugetlb_mfill_atomic_pte() in mm/hugetlb.c The shmem call already depends on the vma flags.. which it still does in your patch 4 here. So you've replaced this: if (!(dst_vma->vm_flags & VM_SHARED)) { ... } else { shmem_mfill_atomic_pte() } With... if (!(dst_vma->vm_flags & VM_SHARED)) { ... } else { ... uffd_ops->uffd_copy() } So, really, what needs to happen first is userfaultfd needs to be sorted. There's no point of creating a vm_ops_uffd if it will just serve as replacing the call locations of the functions like this, as it has done nothing to simplify the logic. > However if we want to generalize userfaultfd capability for a type of > memory, we will still need something like the vm_uffd_ops hook to report > such information. It means drivers can still overwrite these, with/without > an exported mfill_atomic_install_pte() functions. I'm not sure whether > that eases the concern. If we work through the duplication and reduction where possible, the path forward may be easier to see. > > So to me, generalizing the mem type looks helpful with/without moving > guest-memfd under mm/. Yes, it should decrease the duplication across hugetlb.c and shmem.c, but I think that userfaultfd is the place to start. > > We do have the option to keep hard-code guest-memfd like shmem or > hugetlbfs. This is still "doable", but this likely means guest-memfd > support for userfaultfd needs to be done after that work. I did quickly > check the status of gunyah hypervisor [1,2,3], I found that all of the > efforts are not yet continued in 2025. The hypervisor last update was Jan > 2024 with a batch push [1]. > > I still prefer generalizing uffd capabilities using the ops. That makes > guest-memfd support on MINOR not be blocked and it should be able to be > done concurrently v.s. guest-memfd library. If guest-memfd library idea > didn't move on, it's non-issue either. > > I've considered dropping uffd_copy() and MISSING support for vm_uffd_ops if > I'm going to repost - that looks like the only thing that people are > against with, even though that is not my preference, as that'll make the > API half-broken on its own. The generalisation you did does not generalize much, as I pointed out above, and so it seems less impactful than it could be. These patches also do not explore what this means for guest_memfd. So it is not clear that the expected behaviour will serve the need. You sent a link to an example user. Can you please keep this work together in the patch set so that we know it'll work for your use case and allows us an easier way to pull down this work so we can examine it. Alternatively, you can reduce and combine the memory types without exposing the changes externally, if they stand on their own. But I don't think anyone is going to accept using a vm_ops change where a direct function call could be used. > Said that, I still prefer this against > hard-code and/or use CONFIG_GUESTMEM in userfaultfd code. It also does nothing with regards to the CONFIG_USERFAULTFD in other areas. My hope is that you could pull out the common code and make the CONFIG_ sections smaller. And, by the way, it isn't the fact that we're going to copy something (or mfill_atomic it, I guess?) but the fact that we're handing out the pointer for something else to do that. Please handle this manipulation in the core mm code without handing out pointers to folios, or page tables. You could do this with the address being passed in and figure out the type, or even a function pointer that you specifically pass in an enum of the type (I think this is what Lorenzo was suggesting somewhere), maybe with multiple flags for actions and fallback (MFILL|ZERO for example). Thanks, Liam