3 * Copyright (C) 2010 - 2015 UNISYS CORPORATION
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
13 * NON INFRINGEMENT. See the GNU General Public License for more
17 #ifndef __VISORCHIPSET_H__
18 #define __VISORCHIPSET_H__
20 #include <linux/uuid.h>
22 #include "controlvmchannel.h"
23 #include "vbusdeviceinfo.h"
24 #include "vbushelper.h"
26 /* These functions will be called from within visorchipset when certain
27 * events happen. (The implementation of these functions is outside of
30 struct visorchipset_busdev_notifiers {
31 void (*bus_create)(struct visor_device *bus_info);
32 void (*bus_destroy)(struct visor_device *bus_info);
33 void (*device_create)(struct visor_device *bus_info);
34 void (*device_destroy)(struct visor_device *bus_info);
35 void (*device_pause)(struct visor_device *bus_info);
36 void (*device_resume)(struct visor_device *bus_info);
39 /* These functions live inside visorchipset, and will be called to indicate
40 * responses to specific events (by code outside of visorchipset).
41 * For now, the value for each response is simply either:
45 struct visorchipset_busdev_responders {
46 void (*bus_create)(struct visor_device *p, int response);
47 void (*bus_destroy)(struct visor_device *p, int response);
48 void (*device_create)(struct visor_device *p, int response);
49 void (*device_destroy)(struct visor_device *p, int response);
50 void (*device_pause)(struct visor_device *p, int response);
51 void (*device_resume)(struct visor_device *p, int response);
54 /** Register functions (in the bus driver) to get called by visorchipset
55 * whenever a bus or device appears for which this guest is to be the
56 * client for. visorchipset will fill in <responders>, to indicate
57 * functions the bus driver should call to indicate message responses.
60 visorchipset_register_busdev(
61 struct visorchipset_busdev_notifiers *notifiers,
62 struct visorchipset_busdev_responders *responders,
63 struct ultra_vbus_deviceinfo *driver_info);
65 /* visorbus init and exit functions */
66 int visorbus_init(void);
67 void visorbus_exit(void);