Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1451237rbb; Mon, 26 Feb 2024 09:36:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUHKNT4eWT6XY+Zz9aEr6MqKYyfoiOc22HGaVlRgnk0cs6oIbz6tz+awG4ttDbzM/pKRufMIPL5x4S/S3OLsu69+F8/XD/MCAxD2g1tpA== X-Google-Smtp-Source: AGHT+IEnLii5tNCJnNS73vTqGDhgo+T4t1IkCE2ycmJSORPvEXpbaCA9qqdzqLMk40kkBi12VlCm X-Received: by 2002:a17:90a:fa86:b0:29a:ac49:6f44 with SMTP id cu6-20020a17090afa8600b0029aac496f44mr4132603pjb.31.1708969003335; Mon, 26 Feb 2024 09:36:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708969003; cv=pass; d=google.com; s=arc-20160816; b=I6OW/ju1XVjZUcTthu0J6ZuLCwIIFKdOS/t/N8r+etiax0+WBIozFOS7uj7SCAOiPS 58FyBUUTkSAlY+mZ3FHTt6hb1UhYlo8z0Iu4nxaMCyy1dGKysuhsXVDFzaGdKxZDPkxX n51mdZ/5VdIvPSlFwQ+kXwwzoKXq5j8Cjl4sAYTT9UYFGWT1RenySeUaLx7mzUWRz1zO bo3kR87Yd4RjBAEWbtoMexzfd41DhymTyTQkLrP1pScmN9ke8GJRjGSG7EhJV04n7q3q koK7Rtho4FhEKljeOIO5CgyhQVuAkxsVNM79tbKLzPS+BUBSmZiqsLZ51LL67JV34+ph I1rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=xo8BL5z8F/dpS6FAXBqNDypdFj4PXEGX78m0qafgn+w=; fh=ny0Ud/xgN6rf68/utqTChh9UvXKjHVNRqddf+tu3hjc=; b=JY9DAavwsMrnmX91WQRX3YiP0QZXDuHr5yDwXPZG/AaHhWQsfocM2c32xCG/CIghEe 6eZBu02jI1QkED8WxmZztkmnMDlSCKB3a7dn+FgFqy0SOjocX/AFA6z7wQoZnmKIImeN RbtMtMO9OaJwoQLAZc8s/sBI3wgEbDSZUQHQoPFu3iKCqxopKlz9dNzxtto4s6AYMUqC 1eTwaGr3GSkR3khKzuLbjUZdGOd5bvzGwykyHW06MLLKuIbSMmnNkJrsko4DpT5WQTLt nG1A0ytNv0As0etbK03n80glziKskk08FEhlyUw1Os5E0XRNL/ZBrxpW7BMbI7qfpJbz hyrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iGXtAiZe; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-82058-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s7-20020a17090a440700b0029a0cabeac9si5901500pjg.47.2024.02.26.09.36.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:36:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82058-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iGXtAiZe; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-82058-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CC037296E61 for ; Mon, 26 Feb 2024 17:28:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78D0E12E1C2; Mon, 26 Feb 2024 17:28:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="iGXtAiZe" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11E5A12C800; Mon, 26 Feb 2024 17:28:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968485; cv=none; b=lwUO6GMQPPOiAGmHIwbOlj042YLe15A5RZwa5YKuzCAtjYjtLWdh98hXClfjhAqoH64Gz+ambWHdL4Och+TsU2t3JgIKlPQw9q8LzEa8rs7/9uc4yywWdfDRavoauDe3Jlru3PRHx7hHnuSeeSuL1/8WA43ltY5GVtTs4nplwVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968485; c=relaxed/simple; bh=2HBgRJuzD/DEzOuUlPeELaZHx85jbXyYOMRMlHWPSzc=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qo8rfRTqDJmCj3QEzlEWEjjxTzP1XDNZZKYT//XGWayQrftwPX0DUigFMmCaohDMpgdGSADTiiAl1Cgej8w2f0DGlP+e80fKegqJxzHiSjzrZ3s6tpGbwquwAs1J1h1sFSYnTyEjnIIC+pKJlZanjE6luDpiOcJpU/iOkwEcths= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=iGXtAiZe; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41QF8hTo032325; Mon, 26 Feb 2024 17:27:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=xo8BL5z8F/dpS6FAXBqND ypdFj4PXEGX78m0qafgn+w=; b=iGXtAiZeAnwWh00/pCFGofQ1KwaPva7d/Ihol 0Ov4ZNEBvedo37tPPfAZwlFnbSuYct7ZSAWsgiPahpvbN+eEsVP8OL3+8pOQBg8U u4HD3ZjcPt/2yDsZDxiR+mL+Fc1E4XVPrmU3lbPgQU+9afqdXyMHNUNlr9Kr3WHh 1ZI2W8z+f+9NFZaGJ4424ErG+q/uE4SdilrHmGbSS97kY/6Mw/y7VkzEDPVQF0ZO gBPG2xT23IB74x5kxPKpVNyWs4AwivfqAZA5Ay7flOnWAJCSXAjQ+jNGtBc+HyXG x5IvoYWAMaen/lCj+g1+r/OwN/NRhKan+MMrgHgj8rDHDQMVw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wgkxq9hfy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 17:27:42 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41QHRWV4026940 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 17:27:32 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 26 Feb 2024 09:27:31 -0800 Date: Mon, 26 Feb 2024 09:27:31 -0800 From: Elliot Berman To: David Hildenbrand CC: Christoph Hellwig , Will Deacon , Quentin Perret , Chris Goldsworthy , Android KVM , "Patrick Daly" , Alex Elder , "Srinivas Kandagatla" , Murali Nalajal , Trilok Soni , "Srivatsa Vaddagiri" , Carl van Schaik , Philip Derrin , Prakruthi Deepak Heragu , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Konrad Dybcio , Bjorn Andersson , "Dmitry Baryshkov" , Fuad Tabba , "Sean Christopherson" , Andrew Morton , , , , , , Subject: Re: Re: [PATCH v17 19/35] arch/mm: Export direct {un,}map functions Message-ID: <20240226092020370-0800.eberman@hu-eberman-lv.qualcomm.com> Mail-Followup-To: David Hildenbrand , Christoph Hellwig , Will Deacon , Quentin Perret , Chris Goldsworthy , Android KVM , Patrick Daly , Alex Elder , Srinivas Kandagatla , Murali Nalajal , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Philip Derrin , Prakruthi Deepak Heragu , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Konrad Dybcio , Bjorn Andersson , Dmitry Baryshkov , Fuad Tabba , Sean Christopherson , Andrew Morton , linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org References: <20240222-gunyah-v17-0-1e9da6763d38@quicinc.com> <20240222-gunyah-v17-19-1e9da6763d38@quicinc.com> <20240223071006483-0800.eberman@hu-eberman-lv.qualcomm.com> <2f4c44ad-b309-4baa-ac21-2ae19efd31fb@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <2f4c44ad-b309-4baa-ac21-2ae19efd31fb@redhat.com> X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: LdjTkC-YCMeGWoOjKwhoFF8DF33-q3k1 X-Proofpoint-GUID: LdjTkC-YCMeGWoOjKwhoFF8DF33-q3k1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-26_11,2024-02-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 spamscore=0 suspectscore=0 bulkscore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402260133 On Mon, Feb 26, 2024 at 12:53:48PM +0100, David Hildenbrand wrote: > On 26.02.24 12:06, Christoph Hellwig wrote: > > The point is that we can't we just allow modules to unmap data from > > the kernel mapping, no matter how noble your intentions are. > > I absolutely agree. > Hi David and Chirstoph, Are your preferences that we should make Gunyah builtin only or should add fixing up S2 PTW errors (or something else)? Also, do you extend that preference to modifying S2 mappings? This would require any hypervisor driver that supports confidential compute usecases to only ever be builtin. Is your concern about unmapping data from kernel mapping, then module being unloaded, and then having no way to recover the mapping? Would a permanent module be better? The primary reason we were wanting to have it as module was to avoid having driver in memory if you're not a Gunyah guest. Thanks, Elliot