From nobody Fri May 10 09:30:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VbNry04BQz5J2bb; Fri, 10 May 2024 09:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VbNrx50lwz4G3w; Fri, 10 May 2024 09:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715333409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jfiMc8qqNLP36l3d0FzA3IbrptCs1ym0H8zsxM/PPCY=; b=TJ4tIx0PZRmJN+9FXj2BcQcSQtT2SXi4ZF9czgkHGrWLwDeEzqLGYAhciuDq2HCGBn4UtM h3g9QliMkiTPw2ExPGIR5HP9NZaF0cXustPSHng3yS0Tef6PLwdkULkcl9SiXPv3YNWoL0 378/IO85ZWMgJflnSQIU1w6MElu/+BcLkgzPIUqbYZpakDSFkGD2mAslU9JFqi2R8JsZ6F iaFjqhSrP5NVQTYV5aF07Re4r3gwwOnYWOTNIB53GgvpN4zuUlO97W7tjgpL15QdWcqrI3 7IkZju2l8aZOkPuqzMPPNLeJGSXsHpuDf9zLSw2xAUy9qa7ZU1GOGB4IHqBcgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715333409; a=rsa-sha256; cv=none; b=x1gAgFKVBN9kwWAjmz+gCsVLmHWBIqGjR/wXgQW1avuCu8rFWBu1xzzqIfCSYrj/iekvM0 rs+2rBBmaf5GH0RNUtoGwgEu8xGt0WtBwmlB0dSb423x08yqkXp3EBU6hhi0SyCtZCo9tL yLMuENkkoOWBFPhTU5IByg3A2J+Fu+SQHF0KYLxgZRJRKz33YOxXepnL0cfi3tgpw4hotT rCjM2pnt9tauWpGLOTG90jSdfDOJkOc9X9K29ymgtZSIfCcrCoKtJSVdeZjlRLE/IE8+AZ bpfphMfCLxfNZ8keySQtrlz8r+UJEG2ArMlZDNFfTKns7QaWdeuy+zYc+dbDtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715333409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jfiMc8qqNLP36l3d0FzA3IbrptCs1ym0H8zsxM/PPCY=; b=Zq8cv9+OKwC48RkzDrpSQ0JCdhHuB/iyrr54RW/CfmzV7nhq/fBdiDUY1YPeVVtoxO2QEt uNE5T6BBcZwxjAQEOXc2kInJLYVwtiCCRGx4maSJL4hoP+rt2YQP2YhqXEXZNFg4TUdHfr Bw6DrwLC5oNa9b0877GiQUSw2EOkGWTOfRV/qWuuc0fR+JW0U1+de7an5V2KW6JJ1sLMZq UD6ZriZ67152tbCqt1kAv0CNDbKKMCRdMIWLSCwl0EVimQ44u2qRkwiSxNb2iIjOM2OcG9 jkZtgUHQ6qhJiJm7M9rxKh7st5L9hmk+ZPygXXLMD0w1AVhhnvG5cUDZunLetA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VbNrx4cKjzXRd; Fri, 10 May 2024 09:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44A9U9O1084899; Fri, 10 May 2024 09:30:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44A9U900084894; Fri, 10 May 2024 09:30:09 GMT (envelope-from git) Date: Fri, 10 May 2024 09:30:09 GMT Message-Id: <202405100930.44A9U900084894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 797f1c7c3dea - main - arm64: Flush the spintable release address List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 797f1c7c3dea51f88fa4c365e75c354a93827ca0 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=797f1c7c3dea51f88fa4c365e75c354a93827ca0 commit 797f1c7c3dea51f88fa4c365e75c354a93827ca0 Author: Andrew Turner AuthorDate: 2024-05-03 16:17:25 +0000 Commit: Andrew Turner CommitDate: 2024-05-10 09:29:24 +0000 arm64: Flush the spintable release address Ensure the spintable release address is written back from the cache to memory. The other CPUs reading this may not be reading it with the cache enabled so ensure it is written to the point of coherency before issuing the wakeup sev. As cpu_dcache_wbinv_range includes the needed barrier remove it from the inline asm before the sev instruction. Reviewed by: jhibbits, kevans Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45083 --- sys/arm64/arm64/mp_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index bd13dde9cee0..e9b015443477 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -430,10 +430,10 @@ enable_cpu_spin(uint64_t cpu, vm_paddr_t entry, vm_paddr_t release_paddr) return (ENOMEM); *release_addr = entry; + cpu_dcache_wbinv_range(release_addr, sizeof(*release_addr)); pmap_unmapdev(release_addr, sizeof(*release_addr)); __asm __volatile( - "dsb sy \n" "sev \n" ::: "memory");