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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 CC049C3DA4A for ; Tue, 20 Aug 2024 11:57:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.780346.1189970 (Exim 4.92) (envelope-from ) id 1sgNUg-00088U-HR; Tue, 20 Aug 2024 11:57:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 780346.1189970; Tue, 20 Aug 2024 11:57:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sgNUg-00088K-D0; Tue, 20 Aug 2024 11:57:46 +0000 Received: by outflank-mailman (input) for mailman id 780346; Tue, 20 Aug 2024 11:57:45 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sgNUf-00087s-JG for xen-devel@lists.xenproject.org; Tue, 20 Aug 2024 11:57:45 +0000 Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 68b1128b-5eeb-11ef-a507-bb4a2ccca743; Tue, 20 Aug 2024 13:57:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id BF681A0242; Tue, 20 Aug 2024 13:57:43 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tRsckY0ESDaT; Tue, 20 Aug 2024 13:57:43 +0200 (CEST) Received: from begin (nat-inria-interne-52-gw-01-bso.bordeaux.inria.fr [194.199.1.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id A71F4A023C; Tue, 20 Aug 2024 13:57:43 +0200 (CEST) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1sgNUd-00000000Fg8-1IZG; Tue, 20 Aug 2024 13:57:43 +0200 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 68b1128b-5eeb-11ef-a507-bb4a2ccca743 Date: Tue, 20 Aug 2024 13:57:43 +0200 From: Samuel Thibault To: Juergen Gross Cc: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v2 3/3] mini-os: mm: convert set_readonly() to use walk_pt() Message-ID: <20240820115743.teyoiov6qx63flna@begin> Mail-Followup-To: Samuel Thibault , Juergen Gross , minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org References: <20240813134158.580-1-jgross@suse.com> <20240813134158.580-4-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240813134158.580-4-jgross@suse.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) Juergen Gross, le mar. 13 août 2024 15:41:58 +0200, a ecrit: > + if ( ro->count == L1_PAGETABLE_ENTRIES ) > + { > + ro->count = 0; > + if ( HYPERVISOR_mmu_update(mmu_updates, ro->count, NULL, > + DOMID_SELF) < 0 ) You need to set ro->count *after* calling mmu_update. Apart from this, Reviewed-by: Samuel Thibault Samuel