From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="iGXtAiZe" 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-arm-msm@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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1070BC5478C for ; Mon, 26 Feb 2024 17:28:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9BppI2Jimufv8fgdWQCxOIAXYDhn0mT93bT5TnfwtFc=; b=beOTpRlA50SdsT Kg77jt2uqPXOMuWETSpcMXGYYjbAnQI7zkEJYJ44yteIULw+nVJIyiBoRdzD+meIKEqWR5RZqaz10 Xi90xtUJNpSC+M1/Hh8XN6prqUyN3ZyK5/EQpud9LA9f1vMEcjUmQCAj4RjQ8tjOyS2FNX0KdOun7 zd0lNYQYsfkUbSno6FOqxo/6p3OTjZGxLbo93F8B0Fek88B+Db/AtT8D6OR7KjxyRnKS9pVFg/Jgx ydDu+WhiH1/mkmMuFFgxjEmvGyo4Qfl2BBNKUJ2qTCuUWWYuz32aok5y/egjnOhaJrQfWj9u7UNdn QVfncC4oKZKgzWOLmvnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1reelk-00000001yE0-02WL; Mon, 26 Feb 2024 17:28:00 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1reelg-00000001yD2-2atV for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2024 17:27:58 +0000 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2f4c44ad-b309-4baa-ac21-2ae19efd31fb@redhat.com> X-Originating-IP: [10.49.16.6] 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240226_092756_807706_A16EA32B X-CRM114-Status: GOOD ( 17.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel