Further research. After tracing the opencl code on both host and linux vm i figured out that the critical difference was that on the host i had
[ 7.145566] kfd kfd: Allocated 3969056 bytes on gart
[ 7.146275] kfd kfd: added device 1002:73bf
While on the guest i had
[ 3.617853] kfd kfd: skipped device 1002:73bf, PCI rejects atomics
So it comes down to Linux AMD drivers requiring “PCI atomics”, and so far i can not find a way get the PCIe Atomics to poke through the KVM.
The full list of possible solution appear to be summed in this thread - https://www.reddit.com/r/VFIO/comments/njgil2/making_pcie_atomics_work_with_vfio_passthrough/
None of that had any effect on OpenCL in Linux VM.
HOWEVER, changing the qemu config to reflect the correct topology:
-device pcie-root-port,chassis=1,id=root1,bus=pcie.0 \
-device vfio-pci,host=04:00.0,bus=root1,multifunction=on,addr=00.0 \
-device vfio-pci,host=04:00.1,bus=root1,addr=00.1 \
Did fix the Windows 10 VM issues. The latest drivers installed and everything works, including OpenCL.
So the only problem left is OpenCL in Linux VM.