lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1474410076-178329-9-git-send-email-abanman@sgi.com>
Date:   Tue, 20 Sep 2016 17:21:14 -0500
From:   Andrew Banman <abanman@....com>
To:     mingo@...hat.com, akpm@...ux-foundation.org
Cc:     tglx@...utronix.de, hpa@...or.com, travis@....com, rja@....com,
        sivanich@....com, x86@...nel.org, linux-kernel@...r.kernel.org,
        abanman@....com
Subject: [PATCH 08/10] arch/x86/platform/uv: BAU UV4 fix payload queue setup

The BAU on UV4 does not need to maintain the payload queue tail pointer. Do
not initialize the tail pointer MMR on UV4.

Note that write_payload_tail is not an abstracted BAU function since it is
an operation specific to pre-UV4 versions. Then we must switch on the UV
version to control its usage, for which we use uvhub_version rather than
is_uv*_hub because it is quicker/more concise.

Signed-off-by: Andrew Banman <abanman@....com>
Acked-by: Mike Travis <travis@....com>
Acked-by: Dimitri Sivanich <sivanich@....com>
---
 arch/x86/platform/uv/tlb_uv.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index bfd03db..56d12eb 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -1826,11 +1826,19 @@ static void pq_init(int node, int pnode)
 
 	first = ops.bau_gpa_to_offset(uv_gpa(pqp));
 	last = ops.bau_gpa_to_offset(uv_gpa(pqp + (DEST_Q_SIZE - 1)));
-	tail = first;
-	gnode = uv_gpa_to_gnode(uv_gpa(pqp));
-	first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail;
 
-	write_mmr_payload_tail(pnode, tail);
+	/*
+	 * Pre UV4, the gnode is required to locate the payload queue
+	 * and the payload queue tail must be maintained by the kernel.
+	 */
+	bcp = &per_cpu(bau_control, smp_processor_id());
+	if (bcp->uvhub_version <= 3) {
+		tail = first;
+		gnode = uv_gpa_to_gnode(uv_gpa(pqp));
+		first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail;
+		write_mmr_payload_tail(pnode, tail);
+	}
+
 	ops.write_payload_first(pnode, first);
 	ops.write_payload_last(pnode, last);
 	ops.write_g_sw_ack(pnode, 0xffffUL);
-- 
1.8.5.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ