{"id":805743,"url":"http://patchwork.ozlabs.org/api/patches/805743/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170825043036.18236-4-npiggin@gmail.com/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<20170825043036.18236-4-npiggin@gmail.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20170825043036.18236-4-npiggin@gmail.com/","date":"2017-08-25T04:30:35","name":"[v3,3/4] powerpc/64s: idle POWER9 can execute stop in virtual mode","commit_ref":"72b0d51d973beab5a06c97279b61a0a58ccf33c8","pull_url":null,"state":"accepted","archived":false,"hash":"a13693c65e7dd8bd51aada629c8a0815ccf55ba4","submitter":{"id":69518,"url":"http://patchwork.ozlabs.org/api/people/69518/?format=json","name":"Nicholas Piggin","email":"npiggin@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170825043036.18236-4-npiggin@gmail.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/805743/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/805743/checks/","tags":{},"related":[],"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 [IPv6:2401:3900:2:1::3])\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 3xdpMJ0nVSz9t5h\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 25 Aug 2017 14:38: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 3xdpMH6gPQzDqMY\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 25 Aug 2017 14:38:35 +1000 (AEST)","from mail-pg0-x242.google.com (mail-pg0-x242.google.com\n\t[IPv6:2607:f8b0:400e:c05::242])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xdpBc5pBfzDrK4\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 25 Aug 2017 14:31:04 +1000 (AEST)","by mail-pg0-x242.google.com with SMTP id t3so2161998pgt.5\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 24 Aug 2017 21:31:04 -0700 (PDT)","from roar.au.ibm.com (203-219-56-202.tpgi.com.au. [203.219.56.202])\n\tby smtp.gmail.com with ESMTPSA id\n\tu195sm9010365pgb.82.2017.08.24.21.30.59\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 24 Aug 2017 21:31:01 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"KovnkTIE\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"KovnkTIE\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"KovnkTIE\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=D8dTNKZAmLLFF3+dPoooVG21nkSR9wjHGpts7l0HGTw=;\n\tb=KovnkTIE9W6ssWnWT2KxIg1r00HwAnpsyMh+S3zGrwF7cAaMBA+EHiCBFvdTNSPmLN\n\tW8hUDwAbbwafSy5dxU/Y6ZDs0hu6ZRdrv7wvi6pOmUISBEbgOu/+4YSzGAPlJlrb0xnF\n\t0YTjoKSEXyvofavYM2jlDygMsbWFJEESS4KR1IVRI3Gav1fpVGhQbEkoE3IqnBPzAqgi\n\thwWqRLTS0hckYFEBpX7DU6b9ZCo/AJBLo67KiZEH3KLeOvmtaYswbLGXhGd/M74HKDdl\n\tD1Yklyq6sdU8wqI9skeXrPPXL6LRlZIyMhgq4cZtDDDpJx4g8+yJJTXEj8pSaPm4kATP\n\taHiA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=D8dTNKZAmLLFF3+dPoooVG21nkSR9wjHGpts7l0HGTw=;\n\tb=m83Tcj0BmTVNd23e0CSvRl74sR/ZefZKWsB213QIqwKQUDP/wramrlvdjf51aaxOwR\n\tGPAXOAfGik5CpfZLiwcgs1yTi3BeXlh5moATk86wD9UcutE6j67QeAFiZMPbuC6h0WpV\n\tCJMVISH1OC3ufDRybKqd7YGzKKsVUSDZw+l43Zu7yQOo/tfH1mqvnf6Om9De7bS5yYZf\n\t2B4NzTnSD/qmtzaE6KtUyAaSJRxLP9BJnXq89DuM+dfJtPY9akN12IDeG4EjZOUcdwQg\n\tLOVbDyVLQ1xytpCcGU0bJjwI6MutmMYs34GXZmUHjAAnjnsBpnlCpJgG/KnQZChB8zfy\n\t3WnA==","X-Gm-Message-State":"AHYfb5iwqTDcA2melo1IHWbmddBXTmtchXieab8SXQgaQTeNrn9wdNEN\n\tNUAonnSxwCyJ1LrO","X-Received":"by 10.99.149.6 with SMTP id p6mr8407649pgd.412.1503635462755;\n\tThu, 24 Aug 2017 21:31:02 -0700 (PDT)","From":"Nicholas Piggin <npiggin@gmail.com>","To":"linuxppc-dev@lists.ozlabs.org","Subject":"[PATCH v3 3/4] powerpc/64s: idle POWER9 can execute stop in virtual\n\tmode","Date":"Fri, 25 Aug 2017 14:30:35 +1000","Message-Id":"<20170825043036.18236-4-npiggin@gmail.com>","X-Mailer":"git-send-email 2.13.3","In-Reply-To":"<20170825043036.18236-1-npiggin@gmail.com>","References":"<20170825043036.18236-1-npiggin@gmail.com>","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":"kvm-ppc@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>","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>"},"content":"The hardware can execute stop in any context, and KVM does not\nrequire real mode because siblings do not share MMU state. This\nsaves a switch to real-mode when going idle.\n\nAcked-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>\nSigned-off-by: Nicholas Piggin <npiggin@gmail.com>\n---\n arch/powerpc/kernel/idle_book3s.S | 9 +++++++++\n 1 file changed, 9 insertions(+)","diff":"diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S\nindex 14e97f442167..32d65ee323a0 100644\n--- a/arch/powerpc/kernel/idle_book3s.S\n+++ b/arch/powerpc/kernel/idle_book3s.S\n@@ -195,7 +195,16 @@ pnv_powersave_common:\n \tstd\tr5,_CCR(r1)\n \tstd\tr1,PACAR1(r13)\n \n+BEGIN_FTR_SECTION\n+\t/*\n+\t * POWER9 does not require real mode to stop, and presently does not\n+\t * set hwthread_state for KVM (threads don't share MMU context), so\n+\t * we can remain in virtual mode for this.\n+\t */\n+\tbctr\n+END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)\n \t/*\n+\t * POWER8\n \t * Go to real mode to do the nap, as required by the architecture.\n \t * Also, we need to be in real mode before setting hwthread_state,\n \t * because as soon as we do that, another thread can switch\n","prefixes":["v3","3/4"]}