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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 432ABC07E9B for ; Tue, 20 Jul 2021 11:57:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 253586113C for ; Tue, 20 Jul 2021 11:57:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236461AbhGTLQZ (ORCPT ); Tue, 20 Jul 2021 07:16:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235524AbhGTLQV (ORCPT ); Tue, 20 Jul 2021 07:16:21 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C77EC061574 for ; Tue, 20 Jul 2021 04:56:58 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id m11-20020a05600c3b0bb0290228f19cb433so1358385wms.0 for ; Tue, 20 Jul 2021 04:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WheQ7fUX5EA867I+bv9cFye5SAD4lIhGyGX5hYkcj+M=; b=vhIcOCOvy5Rai9IUroGOqHvmtz2lTrczf34W0vWXkqQkyInbPoQYwfN0oToFxuLqji ir9eSpzqiHc4OYCUazxINKpDTodBu3AhlbpSxd7yywx03U7AmZ2V27Tz9BMu5d6Y4dqQ 4nQTxB8Ji3Ng/pegFcNH2Lwx7Evla81MoA0JPk4OFxMNXo6T6zsBd9rZy2w3QhMQq/Rb /SEWgi8DzAYYNDXHhXGjJimRiuoL0wwvbGpG7AYgfjYuKeoSm2a9B6gvWOpYVLFIxC02 SocqIuB4fm7W3uVn4Leh6atXqmdtuTkkskx06YtjEMbA/2vDqNc3uNraOjezdjS8A6iz V5Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WheQ7fUX5EA867I+bv9cFye5SAD4lIhGyGX5hYkcj+M=; b=rnpxIORzoaMOevuEvY1OtZPb+HfFUIS1NNuQtYbyupqNWNF1QfuSovdTWZJwkgXXJ9 34pMewaScGsVsVzZZHIU54Q/3U9lfBord2USZazd6B2ywROR7UPx2FFyUNSQkSdNxP9j F1xlk7qOhSQfzJoeGYvemaKbcvoSY1kS8jqvOgsQYlk7OHYi/20fCx3dsGkUl7BGRYmS Ma23gqapF+WFBL+x3pX5lsFEvPxGD5W1N5InSJwj50uoKzil69rOqHxtqg8RFLDQPfEz 4b3f2ApgUaZ0wu5/hs6g1IgC1AoFArVW397SI/2bxi+DbR96R3uE6/V5pes/QU7piLpt KxBg== X-Gm-Message-State: AOAM531/T8OEOUATbZwY+fWli57wO0zPZ4cudJYYln/G3iJn91Y0akPV Thkq5TTRPZgQbpx6+IYLdRqM+g== X-Google-Smtp-Source: ABdhPJwJrV/b4HrNOBTUVc50mwLqlvQcj8GwTPDgrlDwpIuPjeOwLY1hcD8a9O+QoPfgfmLgXfG+yQ== X-Received: by 2002:a1c:1f47:: with SMTP id f68mr31394200wmf.58.1626782216570; Tue, 20 Jul 2021 04:56:56 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:83e0:11ac:c870:2b97]) by smtp.gmail.com with ESMTPSA id j12sm23997076wrq.83.2021.07.20.04.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 04:56:55 -0700 (PDT) Date: Tue, 20 Jul 2021 12:56:52 +0100 From: Quentin Perret To: Marc Zyngier Cc: james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, ardb@kernel.org, qwandor@google.com, tabba@google.com, dbrazdil@google.com, kernel-team@android.com, Yanan Wang Subject: Re: [PATCH 03/14] KVM: arm64: Continue stage-2 map when re-creating mappings Message-ID: References: <20210719104735.3681732-1-qperret@google.com> <20210719104735.3681732-4-qperret@google.com> <87lf62jy9z.wl-maz@kernel.org> <875yx59ysd.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <875yx59ysd.wl-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 20 Jul 2021 at 09:26:10 (+0100), Marc Zyngier wrote: > Right, but this is on a different path, right? Guests can never fault > multiple mappings at once, and it takes you a host hypercall to > perform this "multiple leaves at once". Right. > Is there any way we can restrict this to the hypercall? Or even > better, keep the hypercall as a "one page at a time" thing? I can't > imagine it being performance critical (it is a once-off, and only used > over a rather small region of memory). Then, the called doesn't have > to worry about the page already being mapped or not. This would also > match the behaviour of what I do on the MMIO side. > > Or do you anticipate much gain from this being able to use block > mappings? Not really no, especially given that mappings of shared pages will be forced to page granularity thanks to the other patch we discussed in this series. I was just hoping to reduce the overhead a bit by reducing the number of hypercalls. But as you said, this probably doesn't matter all that much, so happy to rework that. I'll look into making the hcall use one page at a time, and hopefully that'll simplify a few other things in the check_host_share_hyp() path near the end of this series. Thanks, Quentin 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 X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FSL_HELO_FAKE,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3BC9C07E9B for ; Tue, 20 Jul 2021 11:57:01 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 3D20761164 for ; Tue, 20 Jul 2021 11:57:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D20761164 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B02214B0CA; Tue, 20 Jul 2021 07:57:00 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WG7ThJDVrogq; Tue, 20 Jul 2021 07:56:59 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A5BBE4B098; Tue, 20 Jul 2021 07:56:59 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AEDED4B08E for ; Tue, 20 Jul 2021 07:56:58 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uBIr1HpSShG4 for ; Tue, 20 Jul 2021 07:56:57 -0400 (EDT) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id A77294A32E for ; Tue, 20 Jul 2021 07:56:57 -0400 (EDT) Received: by mail-wm1-f45.google.com with SMTP id a23-20020a05600c2257b0290236ec98bebaso1888269wmm.1 for ; Tue, 20 Jul 2021 04:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WheQ7fUX5EA867I+bv9cFye5SAD4lIhGyGX5hYkcj+M=; b=vhIcOCOvy5Rai9IUroGOqHvmtz2lTrczf34W0vWXkqQkyInbPoQYwfN0oToFxuLqji ir9eSpzqiHc4OYCUazxINKpDTodBu3AhlbpSxd7yywx03U7AmZ2V27Tz9BMu5d6Y4dqQ 4nQTxB8Ji3Ng/pegFcNH2Lwx7Evla81MoA0JPk4OFxMNXo6T6zsBd9rZy2w3QhMQq/Rb /SEWgi8DzAYYNDXHhXGjJimRiuoL0wwvbGpG7AYgfjYuKeoSm2a9B6gvWOpYVLFIxC02 SocqIuB4fm7W3uVn4Leh6atXqmdtuTkkskx06YtjEMbA/2vDqNc3uNraOjezdjS8A6iz V5Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WheQ7fUX5EA867I+bv9cFye5SAD4lIhGyGX5hYkcj+M=; b=qN6STcT2XmsgMSN8uILrW60OL9nlaPV06bO2OB07yCJqjtSYWF3NNb/F11ivGf7Pw5 2mJ3xDTLtzw29d6eM3D/x4qLd86yZnBpJx2YfU+FvVbtAQekZLnPXinwxvCcipVmhrUz n4mHepUlIroiBTH9LxZhij/8KLpAEOMTjUQgApB+yozMrwKgs0ZkqpPp2uxcotmGWplc Ly3dqq2QXJ6tDHDxUEi/RxqCYquiYI230b/zFGxMt4/57AuqIM5h3hmzHdvaBN3m+jmV Pv/DUdYsQBCgNNLVzwLrKMa02EGvfo5mshIwgpp2xIgoxRBMGi0qLFu9mdCfn6HYegtg hAZw== X-Gm-Message-State: AOAM530M9feUw6wT6pSyqOW5uXcoyRXfT9TCQ5zugvrSz9RVhKdYZo/V DBe5GD3w941LLOgs47OQSbJxew== X-Google-Smtp-Source: ABdhPJwJrV/b4HrNOBTUVc50mwLqlvQcj8GwTPDgrlDwpIuPjeOwLY1hcD8a9O+QoPfgfmLgXfG+yQ== X-Received: by 2002:a1c:1f47:: with SMTP id f68mr31394200wmf.58.1626782216570; Tue, 20 Jul 2021 04:56:56 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:83e0:11ac:c870:2b97]) by smtp.gmail.com with ESMTPSA id j12sm23997076wrq.83.2021.07.20.04.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 04:56:55 -0700 (PDT) Date: Tue, 20 Jul 2021 12:56:52 +0100 From: Quentin Perret To: Marc Zyngier Subject: Re: [PATCH 03/14] KVM: arm64: Continue stage-2 map when re-creating mappings Message-ID: References: <20210719104735.3681732-1-qperret@google.com> <20210719104735.3681732-4-qperret@google.com> <87lf62jy9z.wl-maz@kernel.org> <875yx59ysd.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <875yx59ysd.wl-maz@kernel.org> Cc: kernel-team@android.com, qwandor@google.com, will@kernel.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Tuesday 20 Jul 2021 at 09:26:10 (+0100), Marc Zyngier wrote: > Right, but this is on a different path, right? Guests can never fault > multiple mappings at once, and it takes you a host hypercall to > perform this "multiple leaves at once". Right. > Is there any way we can restrict this to the hypercall? Or even > better, keep the hypercall as a "one page at a time" thing? I can't > imagine it being performance critical (it is a once-off, and only used > over a rather small region of memory). Then, the called doesn't have > to worry about the page already being mapped or not. This would also > match the behaviour of what I do on the MMIO side. > > Or do you anticipate much gain from this being able to use block > mappings? Not really no, especially given that mappings of shared pages will be forced to page granularity thanks to the other patch we discussed in this series. I was just hoping to reduce the overhead a bit by reducing the number of hypercalls. But as you said, this probably doesn't matter all that much, so happy to rework that. I'll look into making the hcall use one page at a time, and hopefully that'll simplify a few other things in the check_host_share_hyp() path near the end of this series. Thanks, Quentin _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA14AC07E9B for ; Tue, 20 Jul 2021 11:58:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BA1386113B for ; Tue, 20 Jul 2021 11:58:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA1386113B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=2ZQlld4tXumPNZD3L8TBGyWG+wuadT5ar/Rtno4oEFA=; b=tnlGlpoMUxbhQ2 GSy30s5Ec/YaBpIZkwhm2Cr4vAFN0zbIEQtABSbo0cXR/dZCxkwKXham++clGGvVJGXY/EgsGGSLv FQegMw1JoWOnlWNwh5sEz43lv+mqQM3il5oAf0k2YE+Sd5O6c1OejGHKffffvLk6cBSrOFHEMkXay vrwvFl3rBnrOEgbwUttoKWn6D3+C1NFSEKAWQztASSAVkB8PIDPDEM/wxoBdkvH8w/7qsztj27NgY iqIeCktjhk1YwNA6iVXHTPfGYh1DFji7TmaPJ0uS/MdcCeXKpi5MeUGidpYmi303i1O5YZbYMZYDL a049i9s67BP8qN/9P9Ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5oMw-00CjBO-74; Tue, 20 Jul 2021 11:57:02 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5oMs-00CjAx-2s for linux-arm-kernel@lists.infradead.org; Tue, 20 Jul 2021 11:56:59 +0000 Received: by mail-wm1-x32f.google.com with SMTP id b14-20020a1c1b0e0000b02901fc3a62af78so1324094wmb.3 for ; Tue, 20 Jul 2021 04:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WheQ7fUX5EA867I+bv9cFye5SAD4lIhGyGX5hYkcj+M=; b=vhIcOCOvy5Rai9IUroGOqHvmtz2lTrczf34W0vWXkqQkyInbPoQYwfN0oToFxuLqji ir9eSpzqiHc4OYCUazxINKpDTodBu3AhlbpSxd7yywx03U7AmZ2V27Tz9BMu5d6Y4dqQ 4nQTxB8Ji3Ng/pegFcNH2Lwx7Evla81MoA0JPk4OFxMNXo6T6zsBd9rZy2w3QhMQq/Rb /SEWgi8DzAYYNDXHhXGjJimRiuoL0wwvbGpG7AYgfjYuKeoSm2a9B6gvWOpYVLFIxC02 SocqIuB4fm7W3uVn4Leh6atXqmdtuTkkskx06YtjEMbA/2vDqNc3uNraOjezdjS8A6iz V5Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WheQ7fUX5EA867I+bv9cFye5SAD4lIhGyGX5hYkcj+M=; b=l3ozWqgChgItbykiAaL1r3AwXuGJYN7BXdVkcBStK32J3w/0abch+IUeC/zJyCgj7P IogPrbMEYpPYqlInaig22Iw/jBW6IOEGfs4/hWr8UWx6ELc3FAh1vqFRmgQru9Wfx8/R dcrMAu7tkjw4ngjVOr5oymQVEvh6I1kkGlNgoK8WOpn+zjQ3t+wPZXEqcR7bCrRLlxMn TJardNS9Qu74uTa6wQNvcLyc5SCd7axuZ3A1nWc+mIFZPl3TIhaa4i08bbn9VhRtmQea R0Gy29JQ4vgY4DK92v7mmOeHVYQgLceC52m2s47+q+TaVydG26E5HctWeKCwhAEIepSG eUGQ== X-Gm-Message-State: AOAM533gTRhtw0vWHnWlITjX1DFVXv81dRbkwxabXfdwnljrHIS/c1CB fy0PaBqns0uyRM+45sTT+AwmXA== X-Google-Smtp-Source: ABdhPJwJrV/b4HrNOBTUVc50mwLqlvQcj8GwTPDgrlDwpIuPjeOwLY1hcD8a9O+QoPfgfmLgXfG+yQ== X-Received: by 2002:a1c:1f47:: with SMTP id f68mr31394200wmf.58.1626782216570; Tue, 20 Jul 2021 04:56:56 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:83e0:11ac:c870:2b97]) by smtp.gmail.com with ESMTPSA id j12sm23997076wrq.83.2021.07.20.04.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 04:56:55 -0700 (PDT) Date: Tue, 20 Jul 2021 12:56:52 +0100 From: Quentin Perret To: Marc Zyngier Cc: james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, ardb@kernel.org, qwandor@google.com, tabba@google.com, dbrazdil@google.com, kernel-team@android.com, Yanan Wang Subject: Re: [PATCH 03/14] KVM: arm64: Continue stage-2 map when re-creating mappings Message-ID: References: <20210719104735.3681732-1-qperret@google.com> <20210719104735.3681732-4-qperret@google.com> <87lf62jy9z.wl-maz@kernel.org> <875yx59ysd.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <875yx59ysd.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210720_045658_269127_ADD3BCD4 X-CRM114-Status: GOOD ( 19.95 ) 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 20 Jul 2021 at 09:26:10 (+0100), Marc Zyngier wrote: > Right, but this is on a different path, right? Guests can never fault > multiple mappings at once, and it takes you a host hypercall to > perform this "multiple leaves at once". Right. > Is there any way we can restrict this to the hypercall? Or even > better, keep the hypercall as a "one page at a time" thing? I can't > imagine it being performance critical (it is a once-off, and only used > over a rather small region of memory). Then, the called doesn't have > to worry about the page already being mapped or not. This would also > match the behaviour of what I do on the MMIO side. > > Or do you anticipate much gain from this being able to use block > mappings? Not really no, especially given that mappings of shared pages will be forced to page granularity thanks to the other patch we discussed in this series. I was just hoping to reduce the overhead a bit by reducing the number of hypercalls. But as you said, this probably doesn't matter all that much, so happy to rework that. I'll look into making the hcall use one page at a time, and hopefully that'll simplify a few other things in the check_host_share_hyp() path near the end of this series. Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel