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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 A5ED3C433B4 for ; Wed, 12 May 2021 03:20:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86B62610A1 for ; Wed, 12 May 2021 03:20:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230160AbhELDVZ (ORCPT ); Tue, 11 May 2021 23:21:25 -0400 Received: from ozlabs.org ([203.11.71.1]:51885 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbhELDVZ (ORCPT ); Tue, 11 May 2021 23:21:25 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (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 mail.ozlabs.org (Postfix) with ESMTPSA id 4Fg0R41KWyz9sSs; Wed, 12 May 2021 13:20:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1620789616; bh=B7bwN8TGq/XZZxAawjw/TbSLhlFTW9dhi19LbHpXU+I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JKjxrgHjtGz8SZ8PBhyqW7xbbXsyEQYnLz0GshsaBHyP0OESW3EzsnTzoZfzvT/NG quJ37NmTwLbKzIO0VDVtvSbky+i44eNlIq0Fmsk87gduhFreQjvUOAFk+/qSSKTiMM B4b6CcSx13IoZXyp8IwI/ZHRdaTt6i46S/qFF5oSNYAk9sVkWRCfNJ5shupPG2B7sR 3+bA4VB6uqgLzPJcgO7okXeOmoWwhMZE/kFRbXmTt5FT4kR/9JNDkai78WZ/pO0FMt 6LrSK0YL4SmA8CrMWLSCwWjRIWYk68YJK3NknUyTNfCThEeLg2KIr45e2Lfd0f5gYi wiLHK2jSmU1Mg== From: Michael Ellerman To: Sean Christopherson Cc: linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, pbonzini@redhat.com Subject: Re: [PATCH] KVM: PPC: Book3S HV: Fix kvm_unmap_gfn_range_hv() for Hash MMU In-Reply-To: References: <20210511105459.800788-1-mpe@ellerman.id.au> Date: Wed, 12 May 2021 13:20:15 +1000 Message-ID: <87lf8ky6xc.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Sean Christopherson writes: > On Tue, May 11, 2021, Michael Ellerman wrote: >> Commit 32b48bf8514c ("KVM: PPC: Book3S HV: Fix conversion to gfn-based >> MMU notifier callbacks") fixed kvm_unmap_gfn_range_hv() by adding a for >> loop over each gfn in the range. >> >> But for the Hash MMU it repeatedly calls kvm_unmap_rmapp() with the >> first gfn of the range, rather than iterating through the range. >> >> This exhibits as strange guest behaviour, sometimes crashing in firmare, >> or booting and then guest userspace crashing unexpectedly. >> >> Fix it by passing the iterator, gfn, to kvm_unmap_rmapp(). >> >> Fixes: 32b48bf8514c ("KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks") >> Signed-off-by: Michael Ellerman >> --- >> arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> I plan to take this via the powerpc fixes branch. > > FWIW, > > Reviewed-by: Sean Christopherson Thanks. cheers