[{"id":1758527,"web_url":"http://patchwork.ozlabs.org/comment/1758527/","msgid":"<877exnvrmv.fsf@concordia.ellerman.id.au>","date":"2017-08-28T11:49:44","subject":"Re: [PATCH v3 1/4] KVM: PPC: Book3S HV: POWER9 does not require\n\tsecondary thread management","submitter":{"id":46580,"url":"http://patchwork.ozlabs.org/api/people/46580/","name":"Michael Ellerman","email":"mpe@ellerman.id.au"},"content":"Nicholas Piggin <npiggin@gmail.com> writes:\n\n> POWER9 CPUs have independent MMU contexts per thread, so KVM does not\n> need to quiesce secondary threads, so the hwthread_req/hwthread_state\n> protocol does not have to be used. So patch it away on POWER9, and patch\n> away the branch from the Linux idle wakeup to kvm_start_guest that is\n> never used.\n>\n> Add a warning and error out of kvmppc_grab_hwthread in case it is ever\n> called on POWER9.\n>\n> This avoids a hwsync in the idle wakeup path on POWER9.\n>\n> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>\n> ---\n>  arch/powerpc/include/asm/kvm_book3s_asm.h |  4 ++++\n>  arch/powerpc/kernel/idle_book3s.S         | 35 +++++++++++++++++++++----------\n>  arch/powerpc/kvm/book3s_hv.c              | 14 ++++++++++++-\n>  arch/powerpc/kvm/book3s_hv_rmhandlers.S   |  8 +++++++\n>  4 files changed, 49 insertions(+), 12 deletions(-)\n\nPaulus do you mind acking this and I'll put it in my ppc-kvm topic\nbranch.\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xgqsB1rLTz9s7g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 28 Aug 2017 21:53:02 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xgqsB0mL4zDqNY\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 28 Aug 2017 21:53:02 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xgqnP2hg2zDqF0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tMon, 28 Aug 2017 21:49:45 +1000 (AEST)","from authenticated.ozlabs.org (localhost [127.0.0.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPSA id 3xgqnP0tPQz9sN7;\n\tMon, 28 Aug 2017 21:49:45 +1000 (AEST)"],"From":"Michael Ellerman <mpe@ellerman.id.au>","To":"Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org,\n\tPaul Mackerras <paulus@samba.org>","Subject":"Re: [PATCH v3 1/4] KVM: PPC: Book3S HV: POWER9 does not require\n\tsecondary thread management","In-Reply-To":"<20170825043036.18236-2-npiggin@gmail.com>","References":"<20170825043036.18236-1-npiggin@gmail.com>\n\t<20170825043036.18236-2-npiggin@gmail.com>","User-Agent":"Notmuch/0.21 (https://notmuchmail.org)","Date":"Mon, 28 Aug 2017 21:49:44 +1000","Message-ID":"<877exnvrmv.fsf@concordia.ellerman.id.au>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Nicholas Piggin <npiggin@gmail.com>, kvm-ppc@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1758954,"web_url":"http://patchwork.ozlabs.org/comment/1758954/","msgid":"<20170829001319.GE12629@fergus.ozlabs.ibm.com>","date":"2017-08-29T00:13:19","subject":"Re: [PATCH v3 1/4] KVM: PPC: Book3S HV: POWER9 does not require\n\tsecondary thread management","submitter":{"id":67079,"url":"http://patchwork.ozlabs.org/api/people/67079/","name":"Paul Mackerras","email":"paulus@ozlabs.org"},"content":"On Fri, Aug 25, 2017 at 02:30:33PM +1000, Nicholas Piggin wrote:\n> POWER9 CPUs have independent MMU contexts per thread, so KVM does not\n> need to quiesce secondary threads, so the hwthread_req/hwthread_state\n> protocol does not have to be used. So patch it away on POWER9, and patch\n> away the branch from the Linux idle wakeup to kvm_start_guest that is\n> never used.\n> \n> Add a warning and error out of kvmppc_grab_hwthread in case it is ever\n> called on POWER9.\n> \n> This avoids a hwsync in the idle wakeup path on POWER9.\n> \n> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>\n\nSome of the feature sections seem a little unnecessary except for\ndocumentation purposes (e.g. the second one added after the\nkvm_no_guest label), but they won't actually hurt, so:\n\nAcked-by: Paul Mackerras <paulus@ozlabs.org>","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xh8V55tCpz9s65\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 29 Aug 2017 10:22:37 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xh8V54JHwzDqLw\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 29 Aug 2017 10:22:37 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xh8S40jKHzDqGG\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 29 Aug 2017 10:20:52 +1000 (AEST)","by ozlabs.org (Postfix, from userid 1003)\n\tid 3xh8S36BBsz9s7v; Tue, 29 Aug 2017 10:20:51 +1000 (AEST)"],"Authentication-Results":["ozlabs.org; dkim=pass (2048-bit key;\n\tsecure) header.d=ozlabs.org header.i=@ozlabs.org header.b=\"VE89xzr2\";\n\tdkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tsecure) header.d=ozlabs.org header.i=@ozlabs.org header.b=\"VE89xzr2\";\n\tdkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tsecure) header.d=ozlabs.org header.i=@ozlabs.org header.b=\"VE89xzr2\"; \n\tdkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; \n\tt=1503966051; bh=mo3eHa1jfhnPvLm4aNaUb/5tM+qhKZCbd17MnRTcBIM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=VE89xzr2uCQkHiKeuUgq8DKjLLK0HATbfif6kD5saSG4VDL5YjjpyNByZbHzUEteW\n\tzeakU3hs1AvJyp1Raj7AyXwqicv6/C+Emw0ntIh+fUnRGePsXQHIhqC1p9W/fJxRcd\n\trz6vGyRqT4HxAnvzrSdyUuhcA2sWkWpcQSgIt8BS0upwARZRyFX+n/lNy5xZby4WI+\n\tO1dO4uzRwMoWI56z5BdInvQb7DjORl6DTPOfyFi6HBNa2mZgLuRUaR0k+Y4K3oe7QP\n\t4au478M3jUEaX1WMl5RCu/LKA/L49G8qevu9k+6RHZ/bHsG1KAgnVwWADk4xYy2LdR\n\tdpECH7rE0xX/g==","Date":"Tue, 29 Aug 2017 10:13:19 +1000","From":"Paul Mackerras <paulus@ozlabs.org>","To":"Nicholas Piggin <npiggin@gmail.com>","Subject":"Re: [PATCH v3 1/4] KVM: PPC: Book3S HV: POWER9 does not require\n\tsecondary thread management","Message-ID":"<20170829001319.GE12629@fergus.ozlabs.ibm.com>","References":"<20170825043036.18236-1-npiggin@gmail.com>\n\t<20170825043036.18236-2-npiggin@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170825043036.18236-2-npiggin@gmail.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1760900,"web_url":"http://patchwork.ozlabs.org/comment/1760900/","msgid":"<3xjgLV5WRVz9t2M@ozlabs.org>","date":"2017-08-31T11:36:17","subject":"Re: [v3,\n\t1/4] KVM: PPC: Book3S HV: POWER9 does not require secondary thread\n\tmanagement","submitter":{"id":69509,"url":"http://patchwork.ozlabs.org/api/people/69509/","name":"Michael Ellerman","email":"patch-notifications@ellerman.id.au"},"content":"On Fri, 2017-08-25 at 04:30:33 UTC, Nicholas Piggin wrote:\n> POWER9 CPUs have independent MMU contexts per thread, so KVM does not\n> need to quiesce secondary threads, so the hwthread_req/hwthread_state\n> protocol does not have to be used. So patch it away on POWER9, and patch\n> away the branch from the Linux idle wakeup to kvm_start_guest that is\n> never used.\n> \n> Add a warning and error out of kvmppc_grab_hwthread in case it is ever\n> called on POWER9.\n> \n> This avoids a hwsync in the idle wakeup path on POWER9.\n> \n> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>\n> Acked-by: Paul Mackerras <paulus@ozlabs.org>\n\nApplied to powerpc next, thanks.\n\nhttps://git.kernel.org/powerpc/c/94a04bc25a2c6296bd0c5e82c10e82\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjh8N1hkdz9s65\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 22:12:36 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjh8N0mS0zDr2m\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 22:12:36 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjgLW2Y0GzDqTc\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 21:36:19 +1000 (AEST)","by ozlabs.org (Postfix, from userid 1034)\n\tid 3xjgLV5WRVz9t2M; Thu, 31 Aug 2017 21:36:17 +1000 (AEST)"],"X-powerpc-patch-notification":"thanks","X-powerpc-patch-commit":"94a04bc25a2c6296bd0c5e82c10e8231c2b11f77","In-Reply-To":"<20170825043036.18236-2-npiggin@gmail.com>","To":"Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org","From":"Michael Ellerman <patch-notifications@ellerman.id.au>","Subject":"Re: [v3,\n\t1/4] KVM: PPC: Book3S HV: POWER9 does not require secondary thread\n\tmanagement","Message-Id":"<3xjgLV5WRVz9t2M@ozlabs.org>","Date":"Thu, 31 Aug 2017 21:36:17 +1000 (AEST)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Nicholas Piggin <npiggin@gmail.com>, kvm-ppc@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]