[Bug 277326] FreeBSD guest on QEMU with Hyper-V enlightenment on is no longer able to detect Hyper-V devices

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 27 Feb 2024 15:25:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277326

--- Comment #5 from Zhenlei Huang <zlei@FreeBSD.org> ---
(In reply to Zhenlei Huang from comment #4)
> I see lots of comparing of vm_guest in hyperv device drivers. I guess they should be removed to correctly probe Hyper-V devices, to correctly support Hyper-V enlightenment feature.

In case KVM should be reported when Hyper-V enlightenmen is enabled.

# grep -r 'VM_GUEST_HV' sys/dev/hyperv
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c:        if (vm_guest ==
VM_GUEST_HV) {
sys/dev/hyperv/vmbus/vmbus.c:   if (device_get_unit(parent) != 0 || vm_guest !=
VM_GUEST_HV ||
sys/dev/hyperv/vmbus/vmbus.c:   if (device_get_unit(dev) != 0 || vm_guest !=
VM_GUEST_HV ||
sys/dev/hyperv/vmbus/vmbus.c:   if (vm_guest != VM_GUEST_HV || sc == NULL)
sys/dev/hyperv/vmbus/hyperv.c:          if (vm_guest == VM_GUEST_HV)
sys/dev/hyperv/vmbus/hyperv.c:  if (vm_guest != VM_GUEST_HV)
sys/dev/hyperv/vmbus/vmbus_res.c:       if (device_get_unit(dev) != 0 ||
vm_guest != VM_GUEST_HV ||
sys/dev/hyperv/vmbus/x86/hyperv_x86.c:  if (vm_guest != VM_GUEST_HV)
sys/dev/hyperv/vmbus/aarch64/hyperv_aarch64.c:  vm_guest = VM_GUEST_HV;
sys/dev/hyperv/hvsock/hv_sock.c:        if (vm_guest != VM_GUEST_HV)
sys/dev/hyperv/netvsc/if_hn.c:  if (vm_guest != VM_GUEST_HV)

-- 
You are receiving this mail because:
You are the assignee for the bug.