Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp962334pxb; Fri, 22 Jan 2021 03:52:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8FYPiooJr/+CuHbHJvnMEDyEdly11PdhalqRJ952SzYW2EH/vFdQIu1rHq24FHG9tQmSW X-Received: by 2002:a17:906:17c3:: with SMTP id u3mr2627786eje.304.1611316341004; Fri, 22 Jan 2021 03:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611316340; cv=none; d=google.com; s=arc-20160816; b=dVW+0xAXWQjmUSnLrpCbvEF5nrheraTAnmF+E93YTN78a6sN5r9rZNCTCzmKbFEalA O+oJdZRNilc9eck/T5vRtatytCIiYuP718DzVpSmw8pKztwqXCVD3cAfEmol0buCC3YM eWMzemj1tPxBrLst8eZDna6rZ1aOoV74x1w3c9Icede0TH+vKVvoWZ+w7SlOK1pmZimw mSpLNdLP9FtMV1ce2635F/UPqCiZFLFYw4dUNI5ftQe0IER/szwtn46QTKJB997K2TIq 88Q07SRXaQ1VOID9dIptTwkv+4+rw5BqFx7xykU3pImq85EeBgjhLFzsMvud7cO5gIkT F+Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version; bh=EBXa/IsynXCIsWssoVb+aSRpry8cFuJiLl4Bmj+SmpI=; b=nsufCNzZcDdoKzf5YrrVxnPxsFkcYFWcdpYbMK5+JTQqZOKFd4ZBGT2ateXLO7y5f2 6iCGzVAeAlT4gVdzmw8kkBlGUi1Af5gmm3fLBvhOC28K6eN6MB2seXkqbdkKGU7UhPWi ty6eaRwV+BdOILtxWZbMvty+C20I6uAs1/XzyHLbrRk8edMNk7iMJ5bdyocoqs8JAF/D wUK4pONWARQl1ol6vo5ZQpQ2Lj+2ncN6W57pZLtAjseKZDRdwMCWBIodvjhWxygFDEhR P8QhLlLzdk2qXIxDK6vfMOFrzCwUdME+pn5p4/uLNFm3DsrR9glJpNxmaiTJxDEt0NnI vq3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si3365733edy.585.2021.01.22.03.51.57; Fri, 22 Jan 2021 03:52:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727499AbhAVLvD (ORCPT + 99 others); Fri, 22 Jan 2021 06:51:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:35102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727972AbhAVLsf (ORCPT ); Fri, 22 Jan 2021 06:48:35 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 321AE22CA1; Fri, 22 Jan 2021 11:47:54 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l2uuu-009P1V-1R; Fri, 22 Jan 2021 11:47:52 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 22 Jan 2021 11:47:51 +0000 From: Marc Zyngier To: Yanan Wang Cc: Will Deacon , Catalin Marinas , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, James Morse , Julien Thierry , Suzuki K Poulose , Gavin Shan , Quentin Perret , wanghaibin.wang@huawei.com, yezengruan@huawei.com, yuzenghui@huawei.com Subject: Re: [RFC PATCH v4 0/2] Some optimization for stage-2 translation In-Reply-To: <20210122101358.379956-1-wangyanan55@huawei.com> References: <20210122101358.379956-1-wangyanan55@huawei.com> User-Agent: Roundcube Webmail/1.4.10 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: wangyanan55@huawei.com, will@kernel.org, catalin.marinas@arm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, gshan@redhat.com, qperret@google.com, wanghaibin.wang@huawei.com, yezengruan@huawei.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yanan, On 2021-01-22 10:13, Yanan Wang wrote: > Hi, Will, Marc, > Is there any further comment on the v3 series I post previously? None, I was planning to queue them for 5.12 over the weekend. > If they are not fine to you, then I think maybe we should just turn > back to the original solution in v1, where I suggestted to filter out > the case of only updating access permissions in the map handler and > handle it right there. > > Here are the reasons for my current opinion: > With an errno returned from the map handler for this single case, there > will be one more vcpu exit from guest and we also have to consider the > spurious dirty pages. Besides, it seems that the EAGAIN errno has been > chosen specially for this case and can not be used elsewhere for other > reasons, as we will change this errno to zero at the end of the > function. > > The v1 solution looks like more concise at last, so I refine the diff > and post the v4 with two patches here, just for a contrast. > > Which solution will you prefer now? Could you please let me know. I'm still very much opposed to mixing mapping and permission changes. How bad is the spurious return to a vcpu? Thanks, M. -- Jazz is not dead. It just smells funny...