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=-3.6 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 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 1B559C07E9D for ; Mon, 19 Jul 2021 13:40:38 +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 DA9EB60FF4 for ; Mon, 19 Jul 2021 13:40:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA9EB60FF4 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=XrUgQLEGAvGeUFRvtyGnHgIMK6mqvNR3BBKZbtEQSY0=; b=dNHriKIK0WRnP9 2yhY+bSBXjOlR65G75XdY09TDV7Wi4vWGKEBHfb+k0UTvTC9B1+BH8azCpILhCC4TYOnOcAaskUjo 5y4Z3atfBHpv17EvuWhLjDEOHPLvG9ApN9sRLeKGWSaeNM0VHpQ2YciQi6tL2cDeMNrVK3KNSCYvf HQbDY8keWuhxEFMgmuckLV2SI3g+IVHqwVOxD+OzIAuOIB3Cmzcu7tX/58KsMBb5WVEI5LiaAEBHn HlgtN05bgCqXwH/FVY4Zq1uICFIrgeJxWbiO+ygJo+4+DP7TcfiXus4k1oJh/BWlZ8Q52/4uQ7CPN FKvjKxejSAPKQeG6qH9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5TUH-009l1Q-W1; Mon, 19 Jul 2021 13:39:14 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5TUE-009l12-Vx for linux-arm-kernel@lists.infradead.org; Mon, 19 Jul 2021 13:39:12 +0000 Received: by mail-wm1-x331.google.com with SMTP id p15-20020a05600c358fb0290245467f26a4so29305wmq.0 for ; Mon, 19 Jul 2021 06:39:10 -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=YWipcSLEOaheP07xex9veQfZl0Z1vV0LQN+2n8cjKsA=; b=CNm1BBIQqcgx6zX/dXg0WWmp1MmRgupG3sxzggKPJQJmBNC9naFQbjh7hAKRFoMuT4 N6kmjOrM7TwVZCUS3ViuT7cilOVw5TUGEk1JvtpcX+dZ0jnr6+P3n3UElg/7Yk+n3cqR 5dcFbsGLReIGqlwZiYSSUIstzppYHr8STNug0C2hdG9JWZvk3H7aHe69G35165bLgXfF Wz/7jDi77m+ARzTOT/sUN9Tp7PXBNcS7I0LYMPtOUhStGhqNAuqTdAxMBDMsPJS+AU5y Wf7LifU3sZdwHZPUOhG5v5/ykSoXjkBecRidb642zpacSEv20rn8IkVcf3hUDWKXGZES 5owA== 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=YWipcSLEOaheP07xex9veQfZl0Z1vV0LQN+2n8cjKsA=; b=k2kjT7X6NiP/AleewyeqKQFiO6HOCGtG/UioKkPtzZzk3s6DOFnMM/XVaM0QRPbuJZ CYMSsJ8GGP7wkcPDgz+HvudMXwOexEVJu8PgxtIyh+xQGBsozD7SYjS0rmxLqXjHTH+q VAMes5EtXniYw1U4ND4ToODm+VVOHh0BeZWZjG82m8NBWuN8o4EnDokoD7bFmd2OHzuv +KfZA9kJa2DzkGovXBD9cG2YdSzdvt7e99bMHJ7FZgLQa/4ObGllmDzQ4xjmQD3W3VR0 pZ4i85QPMGPKYyQYDbJ0TCJn3FgjMUVc43/YJRP/ybUOrtuT3cNCv7bMEduwGZeqPjag H4BA== X-Gm-Message-State: AOAM530hoY0XZKndEqM8MuRJGGRdp2hZgeGw9G3RmIuUGMIXnARUM3nL pPhVc64qWde4lCQm92vEio+tKA== X-Google-Smtp-Source: ABdhPJyYT/YffwHR1fUpFsi8GYZ3DLBHWESA81MHvoJEipodSYGoTNpTuaPUSnMI7u6L0EQikRpzog== X-Received: by 2002:a7b:c251:: with SMTP id b17mr11503607wmj.83.1626701949064; Mon, 19 Jul 2021 06:39:09 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:83e0:11ac:c870:2b97]) by smtp.gmail.com with ESMTPSA id p9sm8224430wrj.54.2021.07.19.06.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 06:39:08 -0700 (PDT) Date: Mon, 19 Jul 2021 14:39:05 +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 Subject: Re: [PATCH 05/14] KVM: arm64: Don't overwrite ignored bits with owner id Message-ID: References: <20210719104735.3681732-1-qperret@google.com> <20210719104735.3681732-6-qperret@google.com> <87im16jwe6.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87im16jwe6.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_063911_111394_2F1051DD X-CRM114-Status: GOOD ( 17.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 Monday 19 Jul 2021 at 13:55:29 (+0100), Marc Zyngier wrote: > On Mon, 19 Jul 2021 11:47:26 +0100, > Quentin Perret wrote: > > > > The nVHE protected mode uses invalid mappings in the host stage-2 > > page-table to track the owner of each page in the system. In order to > > allow the usage of ignored bits (a.k.a. software bits) in these > > mappings, move the owner encoding away from the top bits. > > But that's exactly what the current situation is allowing: the use of > the SW bits. I am guessing that what you really mean is that you want > to *preserve* the SW bits from an existing mapping and use other bits > when the mapping is invalid? Yes, this is really just forward looking, but I think it might be useful to allow annotating invalid mappings with both an owner id _and_ additional flags for e.g. shared pages and such. And using bits [58-55] to store those flags just like we do for valid mappings should make things easier, but no big deal. I see how this is going to conflict with kvm_pgtable_stage2_annotate() from your series though, so maybe I should just drop this patch and leave the encoding 'issue' to the caller -- the rest of the series doesn't depend on this anyway, this was just small cleanup. Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel