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 1045BC04A68 for ; Wed, 27 Jul 2022 09:53:42 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/OdizK6P6y/zFOT8HK0JKlRF7RWl/G9lgaqYwKlzQYQ=; b=hIhzTRO3x0hN8A QNBiwlziDKGSuxe3bN2fySiQZ/ScJsbttLRo0mKWixS9wBXv4Fy5eU1vGYpb67yhkYiEdzW04ilTb 4taSi3hSfsWK7ZXfegHzQG4jRngVT76iO/ivXokb0l2fsfjWol+41K6y+wgPN2WvG2MWYuqWvEovd 0NFgtcUA8EeufHdIpCH5ipwsSnFXYthupJjr8QyQjI7W1uYYyMSAzrh1Acp4iVa5Zt7E4gII/F1hc RfnXsD3Gvhl8Bl7Bdn0ZOHxmer2/ZjrXP0BQYm/TwtFePsvVYjgRsji7buvwa/ObNhHCaxjyf02/f veb/g4JeWWtfS3f6XovA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGdic-00C1oM-Dx; Wed, 27 Jul 2022 09:52:42 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGdiZ-00C1m8-GJ for linux-arm-kernel@lists.infradead.org; Wed, 27 Jul 2022 09:52:40 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2AD2DB82002; Wed, 27 Jul 2022 09:52:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5E51C433C1; Wed, 27 Jul 2022 09:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658915556; bh=WlfdeBH2nRApJqfKrf6htjEeKQ/nfMxGUy6uucXQpZI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QCaIcrQdhtgsZq+W5Tc1IDvIb7BdSb4E+34f2HkhM7FKY6msZ9jGo3XMf6+usWCVE ThN4dnB7OqXbdOS+ljvcsn4opxTti46bcjxZqKGWiIIfDZFYWGrfW5kIK1yLaY0foo Heg6QvdEhTff9oHSHk/q+CM4XAS2o11cqt0A+4lHqlaxCq21eqD4x07xj1F1uvnF5F SBA5wpiHZ8QMA8prJR+Dp/4vWiD7HkVz3TwxvQPUVn9s2S3cc1F18m7WoHNMjA/UDg J6DwAPXoR5e/mMDkIRsPn6T5/aIDjD8jfyE7tGLmHQiZ6BC/6csuYKDwH1i6ch6rjw KrdC99paHddOg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oGdiU-00AMhP-Ps; Wed, 27 Jul 2022 10:52:34 +0100 Date: Wed, 27 Jul 2022 10:52:34 +0100 Message-ID: <874jz2yja5.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Alexandru Elisei , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: Re: KVM/arm64: SPE: Translate VA to IPA on a stage 2 fault instead of pinning VM memory In-Reply-To: <875yjiyka4.wl-maz@kernel.org> References: <20220419141012.GB6143@willie-the-truck> <875yjiyka4.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, alexandru.elisei@arm.com, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220727_025239_719960_B6C5EBA1 X-CRM114-Status: GOOD ( 19.67 ) 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 Wed, 27 Jul 2022 10:30:59 +0100, Marc Zyngier wrote: > > On Tue, 26 Jul 2022 18:51:21 +0100, > Oliver Upton wrote: > > > > Doesn't pinning the buffer also imply pinning the stage 1 tables > > responsible for its translation as well? I agree that pinning the buffer > > is likely the best way forward as pinning the whole of guest memory is > > entirely impractical. Huh, I just realised that you were talking about S1. I don't think we need to do this. As long as the translation falls into a mapped region (pinned or not), we don't need to worry. If we get a S2 translation fault from SPE, we just go and map it. And TBH the pinning here is just a optimisation against things like swap, KSM and similar things. The only thing we need to make sure is that the fault is handled in the context of the vcpu that owns this SPU. Alex, can you think of anything that would cause a problem (other than performance and possible blackout windows) if we didn't do any pinning at all and just handled the SPE interrupts as normal page faults? Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel