Skip to content

Commit

Permalink
VMBus: Attach VMBus device nubs in IODeviceTree
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldfish64 committed Oct 14, 2023
1 parent ac9e08c commit 8f844d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MacHyperVSupport/VMBus/HyperVVMBus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "HyperVVMBus.hpp"

#include "HyperVVMBusDevice.hpp"
#include <IOKit/IODeviceTreeSupport.h>

OSDefineMetaClassAndStructors(HyperVVMBus, super);

Expand Down Expand Up @@ -448,6 +449,12 @@ bool HyperVVMBus::registerVMBusDevice(VMBusChannel *channel) {
return false;
}

result = childDevice->attachToParent(hvController->getProvider(), gIODTPlane);
if (!result) {
HVSYSLOG("Failed to attach to IODT");
childDevice->release();
return false;
}
childDevice->registerService();
channel->deviceNub = childDevice;

Expand Down

0 comments on commit 8f844d6

Please sign in to comment.