diff options
| author | Michael Brown | 2014-12-11 18:23:45 +0100 |
|---|---|---|
| committer | Michael Brown | 2014-12-18 17:27:37 +0100 |
| commit | d1894970dbb727805acffd9320e3755fab289fe1 (patch) | |
| tree | 26bc88c7e09b04475252f47a05bce46d33c64a6b /src/arch | |
| parent | [hyperv] Add support for Hyper-V hypervisor (diff) | |
| download | ipxe-d1894970dbb727805acffd9320e3755fab289fe1.tar.gz ipxe-d1894970dbb727805acffd9320e3755fab289fe1.tar.xz ipxe-d1894970dbb727805acffd9320e3755fab289fe1.zip | |
[hyperv] Add support for VMBus devices
Add support for an abstraction of a VMBus device.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/x86/drivers/hyperv/hyperv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/x86/drivers/hyperv/hyperv.c b/src/arch/x86/drivers/hyperv/hyperv.c index bd68d051f..390544074 100644 --- a/src/arch/x86/drivers/hyperv/hyperv.c +++ b/src/arch/x86/drivers/hyperv/hyperv.c @@ -38,6 +38,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/cpuid.h> #include <ipxe/msr.h> #include <ipxe/hyperv.h> +#include <ipxe/vmbus.h> #include "hyperv.h" /** Maximum time to wait for a message response @@ -506,9 +507,15 @@ static int hv_probe ( struct root_device *rootdev ) { if ( ( rc = hv_map_synic ( hv ) ) != 0 ) goto err_map_synic; + /* Probe Hyper-V devices */ + if ( ( rc = vmbus_probe ( hv, &rootdev->dev ) ) != 0 ) + goto err_vmbus_probe; + rootdev_set_drvdata ( rootdev, hv ); return 0; + vmbus_remove ( hv, &rootdev->dev ); + err_vmbus_probe: hv_unmap_synic ( hv ); err_map_synic: hv_unmap_hypercall ( hv ); @@ -532,6 +539,7 @@ static int hv_probe ( struct root_device *rootdev ) { static void hv_remove ( struct root_device *rootdev ) { struct hv_hypervisor *hv = rootdev_get_drvdata ( rootdev ); + vmbus_remove ( hv, &rootdev->dev ); hv_unmap_synic ( hv ); hv_unmap_hypercall ( hv ); hv_free_message ( hv ); |
