1 /* 2 * QEMU Hyper-V VMBus root bridge 3 * 4 * Copyright (c) 2017-2018 Virtuozzo International GmbH. 5 * 6 * This work is licensed under the terms of the GNU GPL, version 2 or later. 7 * See the COPYING file in the top-level directory. 8 */ 9 10 #ifndef HW_HYPERV_VMBUS_BRIDGE_H 11 #define HW_HYPERV_VMBUS_BRIDGE_H 12 13 #include "hw/sysbus.h" 14 #include "hw/hyperv/vmbus.h" 15 #include "qom/object.h" 16 17 #define TYPE_VMBUS_BRIDGE "vmbus-bridge" 18 19 struct VMBusBridge { 20 SysBusDevice parent_obj; 21 22 uint8_t irq; 23 24 VMBus *bus; 25 }; 26 typedef struct VMBusBridge VMBusBridge; 27 28 DECLARE_INSTANCE_CHECKER(VMBusBridge, VMBUS_BRIDGE, 29 TYPE_VMBUS_BRIDGE) 30 31 static inline VMBusBridge *vmbus_bridge_find(void) 32 { 33 return VMBUS_BRIDGE(object_resolve_path_type("", TYPE_VMBUS_BRIDGE, NULL)); 34 } 35 36 #endif 37