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 8DBEEC5475B for ; Wed, 6 Mar 2024 12:06:09 +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:To:From:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=THEwO+CitPzM/21zb+KIr+AdBIBRdfYJ7Wk8W8vsUQI=; b=dZNUew9hE3r2Fk LiaWcTqN4dUGj1u/CG6N3gl9xCBzYKJ/cbEhoQpNraRpl74P8COnLN8dHDx2z42c53XnOAkozyyYg ZR0a7iaawqwLXJZ0KzllmhmbwGQodY26vS7mjHeE4JY1XGo7HFjfHn+nDbgjcw0/1KNPXSdMaa1KU 4kgARwPEDQxxSX31G30fMsDSUuiKF7oc3VMVcOnoZa4WlD4MwTIn/XnLOGdqadzyR6W0PJQjNxZRn r0sMCT4NL/uZLgjsz3CjhOcwPPn92pfRykiU/XaawDszXpHhA/hanuk0cukP/0YEZM7Z1uoEYhUNU cQ/4k3EBI1Pmy+L5GQcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhq1x-000000007YR-1VHD; Wed, 06 Mar 2024 12:05:53 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhq1s-000000007Uu-26Hc for linux-arm-kernel@lists.infradead.org; Wed, 06 Mar 2024 12:05:51 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a44665605f3so714901566b.2 for ; Wed, 06 Mar 2024 04:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709726746; x=1710331546; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=vQBd6ohf0amX1OsSt75FPx0/Dj4ojSvbJw4UdMmdjuQ=; b=1hC0fEFJQean11UXWcKR+NS7LrOi4q3XnNwFLG984n6gCfCwAHwavM0BPV3ZyESnGw LPTCuu5RK57Rd7chaU+5lyeWhuK+pWBX6Y9mC6M4LtipjG7vDn/eptb8Ddk60dDlWq1C ysYjeA53ae6HYp9yD+RW7D7LbRoiSTxRRM8Ychu2K3JiAmg7HTbpB8DNVHtCcdONnOjF 3U/SvxfCol1cu4WYvV8tVX4duxgDbUIxBln/cCyDTo76DAw9CwvWk/uwgbIatusDnfpd ixtDCskaIynEhRTj4saYEIRJ+cq2JvVHeE+lik67h2vMH77IkxY0dmw7M/Oc83U66kfN AUFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709726746; x=1710331546; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vQBd6ohf0amX1OsSt75FPx0/Dj4ojSvbJw4UdMmdjuQ=; b=Sgha2CfBEg6j0YmBbjuHvynzBB1119wW9EOeLC/h2IbKT9v8GwbZ0mosCCwKKd/yUt kWkrEfa06yrJXuOTFyERogHhxyneIWFYN1zPQgXIqZMB/aqK4fS2pGNVVtEqA2I6iyHu G0PAwcOVCRdOlHqOpcxnE7NoqVeh/bVWlOYUWX4i78c+Lkk7r1hK0e1TEYGSN3W4Xz2E 5GI5f378d562XEXBzyfe01336qFx18B0D8gfOW4UaD8zexXawam07x9gqsufeNtwlnVL tHqBy9LTJXW58dzSNPWfRS7f6/tgJbzfzsY1pRkYGrr3THfEj+JPLAj6+IdyN4y4bs/q ie0A== X-Forwarded-Encrypted: i=1; AJvYcCV2qHDr54T1CsDl7nAciWdomFcMl0JYZkjf5gb7xH5WY/SqDkoptVHBRcRGAxo3QokWZekaQwYO2syCYMNYEnohujuJGr8XJbcWm5vRCZ8TaFYOcO0= X-Gm-Message-State: AOJu0Yzp2JNomN1wWZuBOfyu80xfDppf6SBN/FByzrXgmFa8dhb1HWz3 T7pBIWssolhBhF49F0FwCVkVEJqxJDuvwu3Y5QFa01XXSOPLiKsodc6IexNAMA== X-Google-Smtp-Source: AGHT+IENvyQtE8JoTg5kWVbQtkdALMsWYIyvhW3MrnxD6N4yBhPGZfzqW1SSMI9IG01/r9t2iOYJ8Q== X-Received: by 2002:a17:906:b850:b0:a45:ad29:72e7 with SMTP id ga16-20020a170906b85000b00a45ad2972e7mr2827372ejb.36.1709726746372; Wed, 06 Mar 2024 04:05:46 -0800 (PST) Received: from google.com (64.227.90.34.bc.googleusercontent.com. [34.90.227.64]) by smtp.gmail.com with ESMTPSA id h20-20020a170906591400b00a3d5efc65e0sm7072616ejq.91.2024.03.06.04.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 04:05:45 -0800 (PST) Date: Wed, 6 Mar 2024 12:05:38 +0000 From: Quentin Perret To: Christoph Hellwig , Will Deacon , 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 Subject: Re: Re: Re: Re: [PATCH v17 19/35] arch/mm: Export direct {un,}map functions Message-ID: References: <20240222-gunyah-v17-0-1e9da6763d38@quicinc.com> <20240222-gunyah-v17-19-1e9da6763d38@quicinc.com> <20240223071006483-0800.eberman@hu-eberman-lv.qualcomm.com> <20240304094828133-0800.eberman@hu-eberman-lv.qualcomm.com> <20240305093131473-0800.eberman@hu-eberman-lv.qualcomm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240305093131473-0800.eberman@hu-eberman-lv.qualcomm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_040548_630591_17C219B9 X-CRM114-Status: GOOD ( 20.06 ) 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 Tuesday 05 Mar 2024 at 12:26:59 (-0800), Elliot Berman wrote: > I still disagree that this is a Gunyah-specific problem. As far as we > can tell, Arm doesn't specify how EL2 can tell EL1 its S2 page tables > couldn't give a validation translation of the IPA from stage 1. IMO, > downstream/Android pKVM is violating spec for ESR_EL1 by using the > S1PTW bit (which is res0 for everyone except EL2 [1]) and this means > that guests need to be pKVM-enlightened. Not really, in pKVM we have a very clear distinction between host Linux and guests, and only the host needs to be enlightened. But luckily, since pKVM is part of Linux, this is pretty much an internal kernel thing, so we're very flexible and if the S1PTW trick ever conflicts with something else (e.g. NV) we can fairly easily switch to another approach. We can tolerate non-architectural tricks like that between pKVM and host Linux because that is not ABI, but we certainly can't do that for guests. > If we are adding pKVM > enlightment in the exception handlers, can we add Gunyah enlightment to > handle the same? If you mean extending the Linux SEA handler so it does what Gunyah wants, then I'm personally not supportive of that idea since the 'contract' between Linux and Gunyah _is_ the architecture. The only ways I could see Gunyah delegate stage-2 fault handling to Linux cleanly is: - either talk to Arm to introduce a new ESR specifically for this, which doesn't sound entirely crazy to me; - or have Gunyah and Linux negotiate in software the location of the handlers. That probably means SDEI or equivalent which is a can of worm in itself I presume, and I'm not sure how feasible it would be for this handler to live in the Gunyah driver (that too probably requires exporting kernel symbols we don't want to export). Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel