2 * Copyright (C) 2010 - 2015 UNISYS CORPORATION
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
12 * NON INFRINGEMENT. See the GNU General Public License for more
16 #ifndef __VBUSCHANNEL_H__
17 #define __VBUSCHANNEL_H__
20 * The vbus channel is the channel area provided via the BUS_CREATE controlvm
21 * message for each virtual bus. This channel area is provided to both server
22 * and client ends of the bus. The channel header area is initialized by
23 * the server, and the remaining information is filled in by the client.
24 * We currently use this for the client to provide various information about
25 * the client devices and client drivers for the server end to see.
28 #include <linux/uuid.h>
29 #include <linux/ctype.h>
32 /* {193b331b-c58f-11da-95a9-00e08161165f} */
33 #define VISOR_VBUS_CHANNEL_GUID \
34 GUID_INIT(0x193b331b, 0xc58f, 0x11da, \
35 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
38 * Must increment this whenever you insert or delete fields within this channel
39 * struct. Also increment whenever you change the meaning of fields within this
40 * channel struct so as to break pre-existing software. Note that you can
41 * usually add fields to the END of the channel struct withOUT needing to
44 #define VISOR_VBUS_CHANNEL_VERSIONID 1
47 * struct visor_vbus_deviceinfo
48 * @devtype: Short string identifying the device type.
49 * @drvname: Driver .sys file name.
50 * @infostrs: Kernel vversion.
51 * @reserved: Pad size to 256 bytes.
53 * An array of this struct is present in the channel area for each vbus.
54 * (See vbuschannel.h.). It is filled in by the client side to provide info
55 * about the device and driver from the client's perspective.
57 struct visor_vbus_deviceinfo {
65 * struct visor_vbus_headerinfo
66 * @struct_bytes: Size of this struct in bytes.
67 * @device_info_struct_bytes: Size of VISOR_VBUS_DEVICEINFO.
68 * @dev_info_count: Num of items in DevInfo member. This is the
70 * @chp_info_offset: Byte offset from beginning of this struct to the
72 * @bus_info_offset: Byte offset from beginning of this struct to the
74 * @dev_info_offset: Byte offset from beginning of this struct to the
76 * @reserved: Natural Alignment
78 struct visor_vbus_headerinfo {
80 u32 device_info_struct_bytes;
89 * struct visor_vbus_channel
90 * @channel_header: Initialized by server.
91 * @hdr_info: Initialized by server.
92 * @chp_info: Describes client chipset device and driver.
93 * @bus_info: Describes client bus device and driver.
94 * @dev_info: Describes client device and driver for each device on the
97 struct visor_vbus_channel {
98 struct channel_header channel_header;
99 struct visor_vbus_headerinfo hdr_info;
100 /* The remainder of this channel is filled in by the client */
101 struct visor_vbus_deviceinfo chp_info;
102 struct visor_vbus_deviceinfo bus_info;
103 struct visor_vbus_deviceinfo dev_info[0];