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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D877C433FE for ; Wed, 15 Dec 2021 16:02:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A9F564B133; Wed, 15 Dec 2021 11:02:11 -0500 (EST) 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 X7Z6V37GWvMH; Wed, 15 Dec 2021 11:02:10 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B36C84B18A; Wed, 15 Dec 2021 11:02:10 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C6CA24B133 for ; Wed, 15 Dec 2021 11:02:09 -0500 (EST) 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 X1s8WWhyZ9If for ; Wed, 15 Dec 2021 11:02:08 -0500 (EST) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 903394B11C for ; Wed, 15 Dec 2021 11:02:08 -0500 (EST) Received: by mail-wm1-f48.google.com with SMTP id b73so1481578wmd.0 for ; Wed, 15 Dec 2021 08:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ojSdfd0w7V7R85NomeMNU+dNWNtj40x2sGkRYyr3HT0=; b=JYVSeMPRdrQ/41PTdozayyXZLXZSYkzQQG9C0KSLWhh9Br/hQFLt38glrIgdmQN37B DAPSJe67qjpRb/4nqsO3ViYn8hRtNfHSnLgjRdUCrcnf70lxqhqwVQIv5WPD6+jadLBu NBr1dNs5T7OPU56dnbVYrWz/5qxSbtO/GNlUdNQ9e7aa1zlZ/9/xgzcEfZuYQJyfoDLw oX1BIFy0sk+zfpBqP/p+YmUHVmCno9ZzPS98uY+Tz+VEQjSXnQKSJsE1WoD/6ECYDhzh ZvvV3ASqutKbPPT/1EJhEqXdrTPubyncO2GjYVwJ3/aYvB7JvBWiJMF9zMxayH2sJtW1 EGyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ojSdfd0w7V7R85NomeMNU+dNWNtj40x2sGkRYyr3HT0=; b=Zrup5H0G0CkCvG7TvgbPZxMYdpldGiSPu3HHp9uYhGXMlBKJH0K1qV2Lb843Mhd+lN MKBbJsLiGcHGqSIadb/rue04S5YNYGBterDPfbYPa+Orfl7TNMNhMArF+Dz2sTPxAj2/ frmmOyN5JUB3EIsIrTN8+XS3vZIcglvZq6Q7sk5NGu0Wr8MZZ6Z5buTP2Kvv3V1BJNWp P0hHKzNN2s7N7hi0PxND86EjmTVymanEjYSih7k7fg4MpNOoWapcOqXmtQQCEyycLhlS TMN02d12u0aP/jsIUb18IEf9yvVdbfXXqP0byW8ABBEbr6Sn2tImAEmXC8az58XsWn/z u9ZA== X-Gm-Message-State: AOAM530Z+eFAaiJ8CObo9tdJmskzf43CbEnvpVVv8DbJ0gbQdfY62evz 1UxgnBOLqjkANjskTD5rvi1btg== X-Google-Smtp-Source: ABdhPJxHF+NyYbY/jjawRCuOpa8Ju7jrj/FHpwEjOWpopNN/JwGbTbeM6E/ehn2ANN0Hn9Tx628zTw== X-Received: by 2002:a1c:ed07:: with SMTP id l7mr501846wmh.12.1639584127282; Wed, 15 Dec 2021 08:02:07 -0800 (PST) Received: from google.com ([2a00:79e0:d:210:fc03:4f5b:4e9b:3ec1]) by smtp.gmail.com with ESMTPSA id y11sm3097558wry.70.2021.12.15.08.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 08:02:06 -0800 (PST) Date: Wed, 15 Dec 2021 16:02:03 +0000 From: Quentin Perret To: Andrew Walbran Subject: Re: [PATCH v3 06/15] KVM: arm64: Implement kvm_pgtable_hyp_unmap() at EL2 Message-ID: References: <20211201170411.1561936-1-qperret@google.com> <20211201170411.1561936-7-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: kernel-team@android.com, Marc Zyngier , linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , 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 Hey Andrew, On Wednesday 08 Dec 2021 at 14:40:54 (+0000), Andrew Walbran wrote: > Aha, I didn't realise that block mappings, but it makes sense in that > case. How about adding a note to the function comment here explaining > that reasoning? Otherwise it sounds like the caller has to handle it > somehow. Well in fact the caller does have to handle it if it decided to use block mappings. We just decided not to use them in pkvm for now for simplicity, but I guess that might change at some point. The page-table library is meant to be architecturally compliant (it can create block mappings or not, ...) but the decision of which mappings to create is left to the caller and the handling logic belongs there. At least that's my view of it. So, I actually like the comment the way it is, it describes clearly what the function does, and what the caller should expect. I have a bunch of changes for v4 queued locally, so I'll send it now with that comment left untouched, but please shout if you have an idea on how to make it better. Cheers, 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 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 D15B7C4332F for ; Wed, 15 Dec 2021 16:04:03 +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=b9CPngvf9h7eqpGPB9OekOMJDNC9PYbkNnSE4Xt040o=; b=0pRlpRXux6kbBi 0JxeSjLznohqMiEPRlzuFj2vlzbNJnYnwjTgBWE3oNHBpoQRP0bMk51+Oi/6zUX72l1zmxlgBSnQJ grVPFnzbZy6aVEb2hDBz1n+0+TqpdIRc+9pgmQ2WvtEWbJ+p5YLo4zHVmxZ9UC6PqqIMfeBczNE5q dxajuNk0WLNeEA8G8L/qF2vlMo2/Z1hYUaTiLqm7K8WF6gHld7l2uIUaXRKFw9ga7RB5RjLxe/jE+ VTmTKfJM0m0dy3oya3xei0Ny/6V4EZslB7XiVLX3SozTi+2IWRBCG7oSWsbigq/FFB3zdPpAOtxdw Z6gZ+HCPp3dX3Yv8BCpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxWjV-001WlG-JI; Wed, 15 Dec 2021 16:02:23 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxWjK-001WhD-Hb for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 16:02:13 +0000 Received: by mail-wm1-x329.google.com with SMTP id z206so2709871wmc.1 for ; Wed, 15 Dec 2021 08:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ojSdfd0w7V7R85NomeMNU+dNWNtj40x2sGkRYyr3HT0=; b=JYVSeMPRdrQ/41PTdozayyXZLXZSYkzQQG9C0KSLWhh9Br/hQFLt38glrIgdmQN37B DAPSJe67qjpRb/4nqsO3ViYn8hRtNfHSnLgjRdUCrcnf70lxqhqwVQIv5WPD6+jadLBu NBr1dNs5T7OPU56dnbVYrWz/5qxSbtO/GNlUdNQ9e7aa1zlZ/9/xgzcEfZuYQJyfoDLw oX1BIFy0sk+zfpBqP/p+YmUHVmCno9ZzPS98uY+Tz+VEQjSXnQKSJsE1WoD/6ECYDhzh ZvvV3ASqutKbPPT/1EJhEqXdrTPubyncO2GjYVwJ3/aYvB7JvBWiJMF9zMxayH2sJtW1 EGyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ojSdfd0w7V7R85NomeMNU+dNWNtj40x2sGkRYyr3HT0=; b=35MCFQDXER0pYeNmjXCtSHOj6TmfGW5EvKUncJ7IZIC69tT8c0l//55SkreWOPA/KG aRkPl8CdxAhERJtHPv2GiGdAqajlnoIeyFs9pMBPDWqkDzdGXpMnjt+86Durms+upQLF T+YMDaT0PjbeTgyGT5PYbmXm8GRNIi9Cs0kGnNLAQtGjkuezVI4XkWfsH9t3rKMSmVzP jDdm+iytfOET/Q8OAmSz6hMypehqIhMTmBkPldQc8KK6QR1GeCrJGnzWApavjvlDygJf Iex7b9PpUtl0g1DgIIHSxVDchaTF0+vI5bLufsj4vrJsmWT6+HjMAv60CZ2pzxETUfva JPUA== X-Gm-Message-State: AOAM530wWueJzHFt0MAxP+Ga3nMCRXj8evooEmrMiqb1kVRWPaJicQ5a so/YW76wERsYqdsqV+6EaTjk3w== X-Google-Smtp-Source: ABdhPJxHF+NyYbY/jjawRCuOpa8Ju7jrj/FHpwEjOWpopNN/JwGbTbeM6E/ehn2ANN0Hn9Tx628zTw== X-Received: by 2002:a1c:ed07:: with SMTP id l7mr501846wmh.12.1639584127282; Wed, 15 Dec 2021 08:02:07 -0800 (PST) Received: from google.com ([2a00:79e0:d:210:fc03:4f5b:4e9b:3ec1]) by smtp.gmail.com with ESMTPSA id y11sm3097558wry.70.2021.12.15.08.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 08:02:06 -0800 (PST) Date: Wed, 15 Dec 2021 16:02:03 +0000 From: Quentin Perret To: Andrew Walbran Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v3 06/15] KVM: arm64: Implement kvm_pgtable_hyp_unmap() at EL2 Message-ID: References: <20211201170411.1561936-1-qperret@google.com> <20211201170411.1561936-7-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_080210_659596_9A83C9E4 X-CRM114-Status: GOOD ( 16.13 ) 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 Hey Andrew, On Wednesday 08 Dec 2021 at 14:40:54 (+0000), Andrew Walbran wrote: > Aha, I didn't realise that block mappings, but it makes sense in that > case. How about adding a note to the function comment here explaining > that reasoning? Otherwise it sounds like the caller has to handle it > somehow. Well in fact the caller does have to handle it if it decided to use block mappings. We just decided not to use them in pkvm for now for simplicity, but I guess that might change at some point. The page-table library is meant to be architecturally compliant (it can create block mappings or not, ...) but the decision of which mappings to create is left to the caller and the handling logic belongs there. At least that's my view of it. So, I actually like the comment the way it is, it describes clearly what the function does, and what the caller should expect. I have a bunch of changes for v4 queued locally, so I'll send it now with that comment left untouched, but please shout if you have an idea on how to make it better. Cheers, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42DD5C433F5 for ; Wed, 15 Dec 2021 16:02:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244206AbhLOQCK (ORCPT ); Wed, 15 Dec 2021 11:02:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229899AbhLOQCJ (ORCPT ); Wed, 15 Dec 2021 11:02:09 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07890C061574 for ; Wed, 15 Dec 2021 08:02:09 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id d198-20020a1c1dcf000000b0034569cdd2a2so1351232wmd.5 for ; Wed, 15 Dec 2021 08:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ojSdfd0w7V7R85NomeMNU+dNWNtj40x2sGkRYyr3HT0=; b=JYVSeMPRdrQ/41PTdozayyXZLXZSYkzQQG9C0KSLWhh9Br/hQFLt38glrIgdmQN37B DAPSJe67qjpRb/4nqsO3ViYn8hRtNfHSnLgjRdUCrcnf70lxqhqwVQIv5WPD6+jadLBu NBr1dNs5T7OPU56dnbVYrWz/5qxSbtO/GNlUdNQ9e7aa1zlZ/9/xgzcEfZuYQJyfoDLw oX1BIFy0sk+zfpBqP/p+YmUHVmCno9ZzPS98uY+Tz+VEQjSXnQKSJsE1WoD/6ECYDhzh ZvvV3ASqutKbPPT/1EJhEqXdrTPubyncO2GjYVwJ3/aYvB7JvBWiJMF9zMxayH2sJtW1 EGyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ojSdfd0w7V7R85NomeMNU+dNWNtj40x2sGkRYyr3HT0=; b=GWEF0PZtkHLDJpYC3zrBEcMg4abRhssKGShPdZpXZYJMz6Ht3CmplXs3igy9xO+Bqs 7GPls8HP9juI5YzMIDxjpZL9tZBgmCmjFwxLO7jkkR4mRAuA4o5NMvo/RozXFLWvsMIh 1CRbR5Sg4QCSdt1CcprJixzMkOEc0YpImBYsaQg5TGuQYtA15eLEodGsNAPv6lYWCz7A IF/ragVM1VmRLs+mDcE66qBwHHx6rHfZanaHDYBBAmYcAg2eEXk+uizau9up/1tU9jWz wimO2NKzCHY8Ru3GinwqO3bkZap/C2fiuvWiOAllVvPhZaWXoiNQoeawhkAye6pImGw3 5Flw== X-Gm-Message-State: AOAM531XyNcrpNRYLhTDvfXwe3DKQ1joXgOG5Gza3ZVzC7ulaZFI4Sp1 /R5ecsAaV+/q9Aupg2/nxnKEOA== X-Google-Smtp-Source: ABdhPJxHF+NyYbY/jjawRCuOpa8Ju7jrj/FHpwEjOWpopNN/JwGbTbeM6E/ehn2ANN0Hn9Tx628zTw== X-Received: by 2002:a1c:ed07:: with SMTP id l7mr501846wmh.12.1639584127282; Wed, 15 Dec 2021 08:02:07 -0800 (PST) Received: from google.com ([2a00:79e0:d:210:fc03:4f5b:4e9b:3ec1]) by smtp.gmail.com with ESMTPSA id y11sm3097558wry.70.2021.12.15.08.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 08:02:06 -0800 (PST) Date: Wed, 15 Dec 2021 16:02:03 +0000 From: Quentin Perret To: Andrew Walbran Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v3 06/15] KVM: arm64: Implement kvm_pgtable_hyp_unmap() at EL2 Message-ID: References: <20211201170411.1561936-1-qperret@google.com> <20211201170411.1561936-7-qperret@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Andrew, On Wednesday 08 Dec 2021 at 14:40:54 (+0000), Andrew Walbran wrote: > Aha, I didn't realise that block mappings, but it makes sense in that > case. How about adding a note to the function comment here explaining > that reasoning? Otherwise it sounds like the caller has to handle it > somehow. Well in fact the caller does have to handle it if it decided to use block mappings. We just decided not to use them in pkvm for now for simplicity, but I guess that might change at some point. The page-table library is meant to be architecturally compliant (it can create block mappings or not, ...) but the decision of which mappings to create is left to the caller and the handling logic belongs there. At least that's my view of it. So, I actually like the comment the way it is, it describes clearly what the function does, and what the caller should expect. I have a bunch of changes for v4 queued locally, so I'll send it now with that comment left untouched, but please shout if you have an idea on how to make it better. Cheers, Quentin