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
This commit is contained in:
Andrew Turner 2024-05-03 17:17:25 +01:00
parent c78ebc69c2
commit 797f1c7c3d

View file

@ -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");