From patchwork Tue Oct 10 10:18:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 823784 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yBCmD3NCNz9tY3 for ; Tue, 10 Oct 2017 21:20:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kgPpef1j"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yBCmD2FdrzDr9C for ; Tue, 10 Oct 2017 21:20:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kgPpef1j"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::241; helo=mail-pf0-x241.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kgPpef1j"; dkim-atps=neutral Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yBCkS6RMVzDr4W for ; Tue, 10 Oct 2017 21:18:40 +1100 (AEDT) Received: by mail-pf0-x241.google.com with SMTP id b85so14163101pfj.1 for ; Tue, 10 Oct 2017 03:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=veqYBDXfMcdEYQFON3kM8gBMxJ2M66rvOfgosECO3BE=; b=kgPpef1ja9SuMRZA2Mt6KftAhbDzjVF87VJK8pig4gcC3htXX3LLa2JqdvItgreiwL zHQh/tV8Nb1YP/qkkvXHXAtjmPAsl3isheFe5odEJDJmcjbW7uHxxhl01jg/1aojZnbe odzDmofr/q95bUVIzo24y6uMkkeVaHR5S4616eXhCESwXSgNJHiwxFU2dy21gPAZYSJx aonOh5s4pFjHIvP2TFiKZGoaYdxNJRS4vw8zbSEPdTqGF/RH4RBh6lcVh6mkX2An/GbU YQc7ilDq5SLwM1HyLrTLygE9FywOnv0ob4W5TNnnON6iAWTYvToteuewK3kfh8DBuiMt OA7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=veqYBDXfMcdEYQFON3kM8gBMxJ2M66rvOfgosECO3BE=; b=g4egiFnH6sc/XLO3Mx1E1Dm0yHuJdltwgLlhB8C7EFmxj6NZXVV7cBz1RwiuLkdwZB kb8Qtj7QusTngrewPZQAZ5bk4Ku7G2M3vCQSAwLG3h7qf8E8hG12siZ8OfcO4A4zedKt CWQp+zMlS383ltBCghRyuY7Brt2EXk3QlnsaoBGksxvAVKhQKI5J4I0rOvcswjShgE12 wHcBSdXKkRtNCZxTMR2d4NtotgCok3H7aFmmuKHsb02o3jCCyouUijYsRsUYIvU8DMB0 CBqXzU9p6W9e4QC6Cb7X2/N7Fd4vey+J3Xqx0Fpq5giNz7dmNlmoz91pdK5S0+o9rJnT ZHqw== X-Gm-Message-State: AMCzsaXD7YHsOQN5Gsee3kO8nAMyS6YvpC9Fq7mYcKtSETJynDf2ccQ8 FipaHyH+9MAv79TFtOVjhqtu5w== X-Google-Smtp-Source: AOwi7QA1FnUlq/S10WLNnxXhZ4eWFL2epJ0ui8byJq8Jd/GD0JiEECZmIBmHygcbkMULWpSx4JDN8Q== X-Received: by 10.99.111.5 with SMTP id k5mr11926034pgc.364.1507630718641; Tue, 10 Oct 2017 03:18:38 -0700 (PDT) Received: from roar.au.ibm.com (220-244-152-14.tpgi.com.au. [220.244.152.14]) by smtp.gmail.com with ESMTPSA id k25sm2447896pgf.62.2017.10.10.03.18.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Oct 2017 03:18:37 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] KVM: PPC: Book3S HV: POWER9 more doorbell fixes Date: Tue, 10 Oct 2017 20:18:28 +1000 Message-Id: <20171010101828.5950-1-npiggin@gmail.com> X-Mailer: git-send-email 2.13.3 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm-ppc@vger.kernel.org, Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" - Add another case where msgsync is required. - Required barrier sequence for global doorbells is msgsync ; lwsync - POWER9 DD1 has a different barrier sequence that we don't implement, so remove When msgsnd is used for IPIs to other cores, msgsync must be executed by the target to order stores performed on the source before its msgsnd (provided the source executes the appropriate sync). Fixes: 1704a81ccebc ("KVM: PPC: Book3S HV: Use msgsnd for IPIs to other cores on POWER9") Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 663a4a861e7f..90c07421eba2 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S @@ -1300,6 +1300,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR) bne 3f BEGIN_FTR_SECTION PPC_MSGSYNC + lwsync END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) lbz r0, HSTATE_HOST_IPI(r13) cmpwi r0, 0 @@ -2761,6 +2762,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S) PPC_MSGCLR(6) /* see if it's a host IPI */ li r3, 1 +BEGIN_FTR_SECTION + PPC_MSGSYNC + lwsync +END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) lbz r0, HSTATE_HOST_IPI(r13) cmpwi r0, 0 bnelr