]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
arm64 Hyper-V: enable Hyper-V SMP for ARM64
authorWei Hu <whu@FreeBSD.org>
Wed, 7 Jun 2023 08:03:59 +0000 (08:03 +0000)
committerWei Hu <whu@FreeBSD.org>
Wed, 7 Jun 2023 08:24:13 +0000 (08:24 +0000)
commit4f8c634de09ffa2583306821e235f6f92104e729
tree5783375aaf3674ae90b03835b773e1d0aaa350fb
parent1177a6c8dcfd6625c541d6ffc3c6915b8b6354f7
arm64 Hyper-V: enable Hyper-V SMP for ARM64

Vmbus_synic_setup() is invoked via vmbus_intrhook -> vmbus_doattach
-> smp_rendezvous. On !EARLY_AP_STARTUP (e.g., aarch64), SMP isn't
functional in intrhooks and smp_rendezvous() will just call
vmbus_synic_setup() on the boot processor. There's nothing that will
initialize the pcpu data on every other AP.

To fix it we need to use SI_SUB_SMP for vmbus_doattach(). With this
patch the vmbus interrupt should work on all arm64 cpus on HyperV.

Reported by: kevans
Reviewed by: kevans, whu
Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Obtained from: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D40279
sys/dev/hyperv/vmbus/vmbus.c