From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Date: Thu, 06 May 2021 13:43:10 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks Message-Id: <87pmy47zbl.fsf@mpe.ellerman.id.au> List-Id: References: <20210505121509.1470207-1-npiggin@gmail.com> <9e0a256b-fb5a-4468-ed21-68d524d6ea56@redhat.com> In-Reply-To: <9e0a256b-fb5a-4468-ed21-68d524d6ea56@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paolo Bonzini , Nicholas Piggin , kvm-ppc@vger.kernel.org Cc: Sean Christopherson , Bharata B Rao , linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, "Aneesh Kumar K . V" Paolo Bonzini writes: > On 05/05/21 14:15, Nicholas Piggin wrote: >> Commit b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier >> callbacks") causes unmap_gfn_range and age_gfn callbacks to only work >> on the first gfn in the range. It also makes the aging callbacks call >> into both radix and hash aging functions for radix guests. Fix this. >> >> Add warnings for the single-gfn calls that have been converted to range >> callbacks, in case they ever receieve ranges greater than 1. >> >> Fixes: b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks") >> Reported-by: Bharata B Rao >> Tested-by: Bharata B Rao >> Signed-off-by: Nicholas Piggin > > Sorry for the breakage. I queued this patch. Thanks. Are you planning to send it to Linus before rc1? If not I can pick it up as I already have some things in my next and am intending to send a pull request anyway. cheers 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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 E4E74C433B4 for ; Thu, 6 May 2021 13:43:55 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 40A69610FA for ; Thu, 6 May 2021 13:43:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40A69610FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FbZYM6Npxz3bT3 for ; Thu, 6 May 2021 23:43:51 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=XFMVVAI3; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ellerman.id.au (client-ip=2401:3900:2:1::2; helo=ozlabs.org; envelope-from=mpe@ellerman.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=XFMVVAI3; dkim-atps=neutral Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FbZXq5Cx8z2yxY for ; Thu, 6 May 2021 23:43:22 +1000 (AEST) 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 4FbZXf5l85z9sW4; Thu, 6 May 2021 23:43:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1620308595; bh=Lw/D96fhOtgNxgz0JM0qlpti1j2019x8fmayev0jvJk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XFMVVAI31LtODRi2pRyNyxlQEViG8JGbJt4DnYi5zSBNmg/LbRw4d7ebS42h3FaXm 86h27rf2o2ARQl+2j89Ac3EXzZ6/Lc92PIDSSqtCqF/my0RDFW5KzQhk/laUJ0RB3x fFeD827idy7WTW3AnQoauclxhb1r4rCzyxEABmGSn5wQwGjd7J9K5EArOo/ibwKqK+ fuJYR9YX6hX8i0k+ng6vLrR/PaegSUykaXpMg+slm7IBSoTNpaTYz7T0dSmBK987/c XOeTa1je9q7CMDny79hz98g4PETEynYBismkRdM4yoFqsx2+ycO+JHZGnBg+wk+rcY pbB/qwmePEULA== From: Michael Ellerman To: Paolo Bonzini , Nicholas Piggin , kvm-ppc@vger.kernel.org Subject: Re: [PATCH] KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks In-Reply-To: <9e0a256b-fb5a-4468-ed21-68d524d6ea56@redhat.com> References: <20210505121509.1470207-1-npiggin@gmail.com> <9e0a256b-fb5a-4468-ed21-68d524d6ea56@redhat.com> Date: Thu, 06 May 2021 23:43:10 +1000 Message-ID: <87pmy47zbl.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Christopherson , linuxppc-dev@lists.ozlabs.org, "Aneesh Kumar K . V" , kvm@vger.kernel.org, Bharata B Rao Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Paolo Bonzini writes: > On 05/05/21 14:15, Nicholas Piggin wrote: >> Commit b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier >> callbacks") causes unmap_gfn_range and age_gfn callbacks to only work >> on the first gfn in the range. It also makes the aging callbacks call >> into both radix and hash aging functions for radix guests. Fix this. >> >> Add warnings for the single-gfn calls that have been converted to range >> callbacks, in case they ever receieve ranges greater than 1. >> >> Fixes: b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks") >> Reported-by: Bharata B Rao >> Tested-by: Bharata B Rao >> Signed-off-by: Nicholas Piggin > > Sorry for the breakage. I queued this patch. Thanks. Are you planning to send it to Linus before rc1? If not I can pick it up as I already have some things in my next and am intending to send a pull request anyway. cheers 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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 4E581C43460 for ; Thu, 6 May 2021 13:43:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F33E610FC for ; Thu, 6 May 2021 13:43:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234340AbhEFNoR (ORCPT ); Thu, 6 May 2021 09:44:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234326AbhEFNoQ (ORCPT ); Thu, 6 May 2021 09:44:16 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CCCFC061763; Thu, 6 May 2021 06:43:18 -0700 (PDT) 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 4FbZXf5l85z9sW4; Thu, 6 May 2021 23:43:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1620308595; bh=Lw/D96fhOtgNxgz0JM0qlpti1j2019x8fmayev0jvJk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XFMVVAI31LtODRi2pRyNyxlQEViG8JGbJt4DnYi5zSBNmg/LbRw4d7ebS42h3FaXm 86h27rf2o2ARQl+2j89Ac3EXzZ6/Lc92PIDSSqtCqF/my0RDFW5KzQhk/laUJ0RB3x fFeD827idy7WTW3AnQoauclxhb1r4rCzyxEABmGSn5wQwGjd7J9K5EArOo/ibwKqK+ fuJYR9YX6hX8i0k+ng6vLrR/PaegSUykaXpMg+slm7IBSoTNpaTYz7T0dSmBK987/c XOeTa1je9q7CMDny79hz98g4PETEynYBismkRdM4yoFqsx2+ycO+JHZGnBg+wk+rcY pbB/qwmePEULA== From: Michael Ellerman To: Paolo Bonzini , Nicholas Piggin , kvm-ppc@vger.kernel.org Cc: Sean Christopherson , Bharata B Rao , linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, "Aneesh Kumar K . V" Subject: Re: [PATCH] KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks In-Reply-To: <9e0a256b-fb5a-4468-ed21-68d524d6ea56@redhat.com> References: <20210505121509.1470207-1-npiggin@gmail.com> <9e0a256b-fb5a-4468-ed21-68d524d6ea56@redhat.com> Date: Thu, 06 May 2021 23:43:10 +1000 Message-ID: <87pmy47zbl.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Paolo Bonzini writes: > On 05/05/21 14:15, Nicholas Piggin wrote: >> Commit b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier >> callbacks") causes unmap_gfn_range and age_gfn callbacks to only work >> on the first gfn in the range. It also makes the aging callbacks call >> into both radix and hash aging functions for radix guests. Fix this. >> >> Add warnings for the single-gfn calls that have been converted to range >> callbacks, in case they ever receieve ranges greater than 1. >> >> Fixes: b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks") >> Reported-by: Bharata B Rao >> Tested-by: Bharata B Rao >> Signed-off-by: Nicholas Piggin > > Sorry for the breakage. I queued this patch. Thanks. Are you planning to send it to Linus before rc1? If not I can pick it up as I already have some things in my next and am intending to send a pull request anyway. cheers