1 /* Copyright © 2010 - 2013 UNISYS CORPORATION
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at
7 * your option) any later version.
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 __CONTROLVMCHANNEL_H__
17 #define __CONTROLVMCHANNEL_H__
19 #include "commontypes.h"
21 #include "controlframework.h"
22 enum { INVALID_GUEST_FIRMWARE
, SAMPLE_GUEST_FIRMWARE
,
23 TIANO32_GUEST_FIRMWARE
, TIANO64_GUEST_FIRMWARE
26 /* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */
27 #define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_GUID \
28 {0x2b3c2d10, 0x7ef5, 0x4ad8, \
29 {0xb9, 0x66, 0x34, 0x48, 0xb7, 0x38, 0x6b, 0x3d} }
31 static const GUID UltraControlvmChannelProtocolGuid
=
32 ULTRA_CONTROLVM_CHANNEL_PROTOCOL_GUID
;
34 #define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE \
35 ULTRA_CHANNEL_PROTOCOL_SIGNATURE
36 #define CONTROLVM_MESSAGE_MAX 64
38 /* Must increment this whenever you insert or delete fields within
39 * this channel struct. Also increment whenever you change the meaning
40 * of fields within this channel struct so as to break pre-existing
41 * software. Note that you can usually add fields to the END of the
42 * channel struct withOUT needing to increment this. */
43 #define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID 1
45 #define ULTRA_CONTROLVM_CHANNEL_OK_CLIENT(pChannel, logCtx) \
46 (ULTRA_check_channel_client(pChannel, \
47 UltraControlvmChannelProtocolGuid, \
49 sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL), \
50 ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID, \
51 ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE, \
52 __FILE__, __LINE__, logCtx))
53 #define ULTRA_CONTROLVM_CHANNEL_OK_SERVER(actualBytes, logCtx) \
54 (ULTRA_check_channel_server(UltraControlvmChannelProtocolGuid, \
56 sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL), \
57 actualBytes, __FILE__, __LINE__, logCtx))
59 #define MY_DEVICE_INDEX 0
60 #define MAX_MACDATA_LEN 8 /* number of bytes for MAC address in config packet */
61 #define MAX_SERIAL_NUM 32
63 #define DISK_ZERO_PUN_NUMBER 1 /* Target ID on the SCSI bus for LUN 0 */
64 #define DISK_ZERO_LUN_NUMBER 3 /* Logical Unit Number */
66 /* Defines for various channel queues... */
67 #define CONTROLVM_QUEUE_REQUEST 0
68 #define CONTROLVM_QUEUE_RESPONSE 1
69 #define CONTROLVM_QUEUE_EVENT 2
70 #define CONTROLVM_QUEUE_ACK 3
72 /* Max number of messages stored during IOVM creation to be reused
74 #define CONTROLVM_CRASHMSG_MAX 2
76 /** Ids for commands that may appear in either queue of a ControlVm channel.
78 * Commands that are initiated by the command partition (CP), by an IO or
79 * console service partition (SP), or by a guest partition (GP)are:
80 * - issued on the RequestQueue queue (q #0) in the ControlVm channel
81 * - responded to on the ResponseQueue queue (q #1) in the ControlVm channel
83 * Events that are initiated by an IO or console service partition (SP) or
84 * by a guest partition (GP) are:
85 * - issued on the EventQueue queue (q #2) in the ControlVm channel
86 * - responded to on the EventAckQueue queue (q #3) in the ControlVm channel
89 CONTROLVM_INVALID
= 0,
90 /* SWITCH commands required Parameter: SwitchNumber */
91 /* BUS commands required Parameter: BusNumber */
92 CONTROLVM_BUS_CREATE
= 0x101, /* CP --> SP, GP */
93 CONTROLVM_BUS_DESTROY
= 0x102, /* CP --> SP, GP */
94 CONTROLVM_BUS_CONFIGURE
= 0x104, /* CP --> SP */
95 CONTROLVM_BUS_CHANGESTATE
= 0x105, /* CP --> SP, GP */
96 CONTROLVM_BUS_CHANGESTATE_EVENT
= 0x106, /* SP, GP --> CP */
97 /* DEVICE commands required Parameter: BusNumber, DeviceNumber */
99 CONTROLVM_DEVICE_CREATE
= 0x201, /* CP --> SP, GP */
100 CONTROLVM_DEVICE_DESTROY
= 0x202, /* CP --> SP, GP */
101 CONTROLVM_DEVICE_CONFIGURE
= 0x203, /* CP --> SP */
102 CONTROLVM_DEVICE_CHANGESTATE
= 0x204, /* CP --> SP, GP */
103 CONTROLVM_DEVICE_CHANGESTATE_EVENT
= 0x205, /* SP, GP --> CP */
104 CONTROLVM_DEVICE_RECONFIGURE
= 0x206, /* CP --> Boot */
105 /* DISK commands required Parameter: BusNumber, DeviceNumber */
106 CONTROLVM_DISK_CREATE
= 0x221, /* CP --> SP */
107 CONTROLVM_DISK_DESTROY
= 0x222, /* CP --> SP */
108 CONTROLVM_DISK_CONFIGURE
= 0x223, /* CP --> SP */
109 CONTROLVM_DISK_CHANGESTATE
= 0x224, /* CP --> SP */
110 /* CHIPSET commands */
111 CONTROLVM_CHIPSET_INIT
= 0x301, /* CP --> SP, GP */
112 CONTROLVM_CHIPSET_STOP
= 0x302, /* CP --> SP, GP */
113 CONTROLVM_CHIPSET_SHUTDOWN
= 0x303, /* CP --> SP */
114 CONTROLVM_CHIPSET_READY
= 0x304, /* CP --> SP */
115 CONTROLVM_CHIPSET_SELFTEST
= 0x305, /* CP --> SP */
119 struct InterruptInfo
{
120 /**< specifies interrupt info. It is used to send interrupts
121 * for this channel. The peer at the end of this channel
122 * who has registered an interrupt (using recv fields
123 * above) will receive the interrupt. Passed as a parameter
124 * to Issue_VMCALL_IO_QUEUE_TRANSITION, which generates the
125 * interrupt. Currently this is used by IOPart-SP to wake
126 * up GP when Data Channel transitions from empty to
128 U64 sendInterruptHandle
;
130 /**< specifies interrupt handle. It is used to retrieve the
131 * corresponding interrupt pin from Monitor; and the
132 * interrupt pin is used to connect to the corresponding
133 * intrrupt. Used by IOPart-GP only. */
134 U64 recvInterruptHandle
;
136 /**< specifies interrupt vector. It, interrupt pin, and shared are
137 * used to connect to the corresponding interrupt. Used by
139 U32 recvInterruptVector
;
141 /**< specifies if the recvInterrupt is shared. It, interrupt pin
142 * and vector are used to connect to 0 = not shared; 1 = shared.
143 * the corresponding interrupt. Used by IOPart-GP only. */
144 U8 recvInterruptShared
;
145 U8 reserved
[3]; /* Natural alignment purposes */
153 U8 Reserved
[3]; /* Natural alignment purposes */
156 struct PciConfigHdr
{
162 U32 Reserved
; /* Natural alignment purposes */
169 U32 Host
; /* Command should ignore this for *
170 * DiskArrival/RemovalEvents */
178 struct virtDiskInfo
{
179 U32 switchNo
; /* defined by SWITCH_CREATE */
180 U32 externalPortNo
; /* 0 for SAS RAID provided (external)
181 * virtual disks, 1 for virtual disk
182 * images, 2 for gold disk images */
183 U16 VirtualDiskIndex
; /* Index of disk descriptor in the
184 * VirtualDisk segment associated with
191 CONTROLVM_ACTION_NONE
= 0,
192 CONTROLVM_ACTION_SET_RESTORE
= 0x05E7,
193 CONTROLVM_ACTION_CLEAR_RESTORE
= 0x0C18,
194 CONTROLVM_ACTION_RESTORING
= 0x08E5,
195 CONTROLVM_ACTION_RESTORE_BUSY
= 0x0999,
196 CONTROLVM_ACTION_CLEAR_NVRAM
= 0xB01
199 typedef enum _ULTRA_TOOL_ACTIONS
{
200 /* enumeration that defines intended action */
201 ULTRA_TOOL_ACTION_NONE
= 0, /* normal boot of boot disk */
202 ULTRA_TOOL_ACTION_INSTALL
= 1, /* install source disk(s) to boot
204 ULTRA_TOOL_ACTION_CAPTURE
= 2, /* capture boot disk to target disk(s)
206 ULTRA_TOOL_ACTION_REPAIR
= 3, /* use source disk(s) to repair
207 * installation on boot disk */
208 ULTRA_TOOL_ACTION_CLEAN
= 4, /* 'scrub' virtual disk before
209 * releasing back to storage pool */
210 ULTRA_TOOL_ACTION_UPGRADE
= 5, /* upgrade to use content of images
211 * referenced from newer blueprint */
212 ULTRA_TOOL_ACTION_DIAG
= 6, /* use tool to invoke diagnostic script
213 * provided by blueprint */
214 ULTRA_TOOL_ACTION_FAILED
= 7, /* used when tool fails installation
215 and cannot continue */
216 ULTRA_TOOL_ACTION_COUNT
= 8
217 } ULTRA_TOOL_ACTIONS
;
219 typedef struct _ULTRA_EFI_SPAR_INDICATION
{
220 U64 BootToFirmwareUI
:1; /* Bit 0: Stop in uefi ui */
221 U64 ClearNvram
:1; /* Bit 1: Clear NVRAM */
222 U64 ClearCmos
:1; /* Bit 2: Clear CMOS */
223 U64 BootToTool
:1; /* Bit 3: Run install tool */
224 /* remaining bits are available */
225 } ULTRA_EFI_SPAR_INDICATION
;
228 ULTRA_CHIPSET_FEATURE_REPLY
= 0x00000001,
229 ULTRA_CHIPSET_FEATURE_PARA_HOTPLUG
= 0x00000002,
230 ULTRA_CHIPSET_FEATURE_PCIVBUS
= 0x00000004
231 } ULTRA_CHIPSET_FEATURE
;
233 /** This is the common structure that is at the beginning of every
234 * ControlVm message (both commands and responses) in any ControlVm
235 * queue. Commands are easily distinguished from responses by
236 * looking at the flags.response field.
238 typedef struct _CONTROLVM_MESSAGE_HEADER
{
239 U32 Id
; /* See CONTROLVM_ID. */
240 /* For requests, indicates the message type. */
241 /* For responses, indicates the type of message we are responding to. */
243 U32 MessageSize
; /* Includes size of this struct + size
245 U32 SegmentIndex
; /* Index of segment containing Vm
246 * message/information */
247 U32 CompletionStatus
; /* Error status code or result of
248 * message completion */
250 U32 failed
:1; /**< =1 in a response to * signify
252 U32 responseExpected
:1; /**< =1 in all messages that expect a
253 * response (Control ignores this
255 U32 server
:1; /**< =1 in all bus & device-related
256 * messages where the message
257 * receiver is to act as the bus or
259 U32 testMessage
:1; /**< =1 for testing use only
260 * (Control and Command ignore this
262 U32 partialCompletion
:1; /**< =1 if there are forthcoming
263 * responses/acks associated
264 * with this message */
265 U32 preserve
:1; /**< =1 this is to let us know to
266 * preserve channel contents
267 * (for running guests)*/
268 U32 writerInDiag
:1; /**< =1 the DiagWriter is active in the
269 * Diagnostic Partition*/
271 /* remaining bits in this 32-bit word are available */
273 U32 Reserved
; /* Natural alignment */
274 U64 MessageHandle
; /* Identifies the particular message instance,
275 * and is used to match particular */
276 /* request instances with the corresponding response instance. */
277 U64 PayloadVmOffset
; /* Offset of payload area from start of this
278 * instance of ControlVm segment */
279 U32 PayloadMaxBytes
; /* Maximum bytes allocated in payload
280 * area of ControlVm segment */
281 U32 PayloadBytes
; /* Actual number of bytes of payload
282 * area to copy between IO/Command; */
283 /* if non-zero, there is a payload to copy. */
284 } CONTROLVM_MESSAGE_HEADER
;
286 typedef struct _CONTROLVM_PACKET_DEVICE_CREATE
{
287 U32 busNo
; /**< bus # (0..n-1) from the msg receiver's
290 /* Control uses header SegmentIndex field to access bus number... */
291 U32 devNo
; /**< bus-relative (0..n-1) device number */
292 U64 channelAddr
; /**< Guest physical address of the channel, which
293 * can be dereferenced by the receiver
294 * of this ControlVm command */
295 U64 channelBytes
; /**< specifies size of the channel in bytes */
296 GUID dataTypeGuid
;/**< specifies format of data in channel */
297 GUID devInstGuid
; /**< instance guid for the device */
298 struct InterruptInfo intr
; /**< specifies interrupt information */
299 } CONTROLVM_PACKET_DEVICE_CREATE
; /* for CONTROLVM_DEVICE_CREATE */
301 typedef struct _CONTROLVM_PACKET_DEVICE_CONFIGURE
{
302 U32 busNo
; /**< bus # (0..n-1) from the msg
303 * receiver's perspective */
305 /* Control uses header SegmentIndex field to access bus number... */
306 U32 devNo
; /**< bus-relative (0..n-1) device number */
307 } CONTROLVM_PACKET_DEVICE_CONFIGURE
; /* for CONTROLVM_DEVICE_CONFIGURE */
309 typedef struct _CONTROLVM_MESSAGE_DEVICE_CREATE
{
310 CONTROLVM_MESSAGE_HEADER Header
;
311 CONTROLVM_PACKET_DEVICE_CREATE Packet
;
312 } CONTROLVM_MESSAGE_DEVICE_CREATE
; /* total 128 bytes */
314 typedef struct _CONTROLVM_MESSAGE_DEVICE_CONFIGURE
{
315 CONTROLVM_MESSAGE_HEADER Header
;
316 CONTROLVM_PACKET_DEVICE_CONFIGURE Packet
;
317 } CONTROLVM_MESSAGE_DEVICE_CONFIGURE
; /* total 56 bytes */
319 /* This is the format for a message in any ControlVm queue. */
320 typedef struct _CONTROLVM_MESSAGE_PACKET
{
323 /* BEGIN Request messages */
325 U32 busNo
; /*< bus # (0..n-1) from the msg
326 * receiver's perspective */
328 /* Control uses header SegmentIndex field to access bus number... */
329 U32 deviceCount
; /*< indicates the max number of
330 * devices on this bus */
331 U64 channelAddr
; /*< Guest physical address of the
332 * channel, which can be
333 * dereferenced by the receiver
334 * of this ControlVm command */
335 U64 channelBytes
; /*< size of the channel in bytes */
336 GUID busDataTypeGuid
;/*< indicates format of data in bus
338 GUID busInstGuid
; /*< instance guid for the bus */
339 } createBus
; /* for CONTROLVM_BUS_CREATE */
341 U32 busNo
; /*< bus # (0..n-1) from the msg
342 * receiver's perspective */
344 /* Control uses header SegmentIndex field to access bus number... */
345 U32 reserved
; /* Natural alignment purposes */
346 } destroyBus
; /* for CONTROLVM_BUS_DESTROY */
348 U32 busNo
; /*< bus # (0..n-1) from the
352 /* Control uses header SegmentIndex field to access bus number... */
353 U32 reserved1
; /* for alignment purposes */
354 U64 guestHandle
; /* This is used to convert
355 * guest physical address to real
356 * physical address for DMA, for ex. */
357 U64 recvBusInterruptHandle
;/*< specifies interrupt
358 * info. It is used by SP to register
359 * to receive interrupts from the CP.
360 * This interrupt is used for bus
361 * level notifications. The
363 * sendBusInterruptHandle is kept in
365 } configureBus
; /* for CONTROLVM_BUS_CONFIGURE */
367 /* for CONTROLVM_DEVICE_CREATE */
368 CONTROLVM_PACKET_DEVICE_CREATE createDevice
;
370 U32 busNo
; /*< bus # (0..n-1) from the msg
371 * receiver's perspective */
373 /* Control uses header SegmentIndex field to access bus number... */
374 U32 devNo
; /*< bus-relative (0..n-1) device
376 } destroyDevice
; /* for CONTROLVM_DEVICE_DESTROY */
378 /* for CONTROLVM_DEVICE_CONFIGURE */
379 CONTROLVM_PACKET_DEVICE_CONFIGURE configureDevice
;
381 U32 busNo
; /*< bus # (0..n-1) from the msg
382 * receiver's perspective */
384 /* Control uses header SegmentIndex field to access bus number... */
385 U32 devNo
; /*< bus-relative (0..n-1) device
387 } reconfigureDevice
; /* for CONTROLVM_DEVICE_RECONFIGURE */
390 ULTRA_SEGMENT_STATE state
;
391 U8 reserved
[2]; /* Natural alignment purposes */
392 } busChangeState
; /* for CONTROLVM_BUS_CHANGESTATE */
396 ULTRA_SEGMENT_STATE state
;
398 U32 physicalDevice
:1; /* =1 if message is for
399 * a physical device */
400 /* remaining bits in this 32-bit word are available */
402 U8 reserved
[2]; /* Natural alignment purposes */
403 } deviceChangeState
; /* for CONTROLVM_DEVICE_CHANGESTATE */
407 ULTRA_SEGMENT_STATE state
;
408 U8 reserved
[6]; /* Natural alignment purposes */
409 } deviceChangeStateEvent
; /* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */
411 U32 busCount
; /*< indicates the max number of busses */
412 U32 switchCount
; /*< indicates the max number of
413 * switches (applicable for service
415 ULTRA_CHIPSET_FEATURE features
;
416 U32 platformNumber
; /* Platform Number */
417 } initChipset
; /* for CONTROLVM_CHIPSET_INIT */
419 U32 Options
; /*< reserved */
420 U32 Test
; /*< bit 0 set to run embedded selftest */
421 } chipsetSelftest
; /* for CONTROLVM_CHIPSET_SELFTEST */
423 /* END Request messages */
425 /* BEGIN Response messages */
427 /* END Response messages */
429 /* BEGIN Event messages */
431 /* END Event messages */
433 /* BEGIN Ack messages */
435 /* END Ack messages */
436 U64 addr
; /*< a physical address of something, that
437 * can be dereferenced by the receiver of
438 * this ControlVm command (depends on
440 U64 handle
; /*< a handle of something (depends on
443 } CONTROLVM_MESSAGE_PACKET
;
445 /* All messages in any ControlVm queue have this layout. */
446 typedef struct _CONTROLVM_MESSAGE
{
447 CONTROLVM_MESSAGE_HEADER hdr
;
448 CONTROLVM_MESSAGE_PACKET cmd
;
451 typedef struct _DEVICE_MAP
{
452 GUEST_PHYSICAL_ADDRESS DeviceChannelAddress
;
453 U64 DeviceChannelSize
;
455 U32 Reserved
; /* natural alignment */
456 U64 Reserved2
; /* Align structure on 32-byte boundary */
459 typedef struct _GUEST_DEVICES
{
460 DEVICE_MAP VideoChannel
;
461 DEVICE_MAP KeyboardChannel
;
462 DEVICE_MAP NetworkChannel
;
463 DEVICE_MAP StorageChannel
;
464 DEVICE_MAP ConsoleChannel
;
469 typedef struct _ULTRA_CONTROLVM_CHANNEL_PROTOCOL
{
470 CHANNEL_HEADER Header
;
471 GUEST_PHYSICAL_ADDRESS gpControlVm
; /* guest physical address of
473 GUEST_PHYSICAL_ADDRESS gpPartitionTables
; /* guest physical address of
474 * partition tables */
475 GUEST_PHYSICAL_ADDRESS gpDiagGuest
; /* guest physical address of
476 * diagnostic channel */
477 GUEST_PHYSICAL_ADDRESS gpBootRomDisk
; /* guest phys addr of (read
478 * only) Boot ROM disk */
479 GUEST_PHYSICAL_ADDRESS gpBootRamDisk
; /* guest phys addr of writable
481 GUEST_PHYSICAL_ADDRESS gpAcpiTable
; /* guest phys addr of acpi
483 GUEST_PHYSICAL_ADDRESS gpControlChannel
; /* guest phys addr of control
485 GUEST_PHYSICAL_ADDRESS gpDiagRomDisk
; /* guest phys addr of diagnostic
487 GUEST_PHYSICAL_ADDRESS gpNvram
; /* guest phys addr of NVRAM
489 U64 RequestPayloadOffset
; /* Offset to request payload area */
490 U64 EventPayloadOffset
; /* Offset to event payload area */
491 U32 RequestPayloadBytes
; /* Bytes available in request payload
493 U32 EventPayloadBytes
; /* Bytes available in event payload area */
494 U32 ControlChannelBytes
;
495 U32 NvramChannelBytes
; /* Bytes in PartitionNvram segment */
496 U32 MessageBytes
; /* sizeof(CONTROLVM_MESSAGE) */
497 U32 MessageCount
; /* CONTROLVM_MESSAGE_MAX */
498 GUEST_PHYSICAL_ADDRESS gpSmbiosTable
; /* guest phys addr of SMBIOS
500 GUEST_PHYSICAL_ADDRESS gpPhysicalSmbiosTable
; /* guest phys addr of
502 /* ULTRA_MAX_GUESTS_PER_SERVICE */
503 GUEST_DEVICES gpObsoleteGuestDevices
[16];
505 /* guest physical address of EFI firmware image base */
506 GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareImageBase
;
508 /* guest physical address of EFI firmware entry point */
509 GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareEntryPoint
;
511 /* guest EFI firmware image size */
512 U64 VirtualGuestFirmwareImageSize
;
514 /* GPA = 1MB where EFI firmware image is copied to */
515 GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareBootBase
;
516 GUEST_PHYSICAL_ADDRESS VirtualGuestImageBase
;
517 GUEST_PHYSICAL_ADDRESS VirtualGuestImageSize
;
518 U64 PrototypeControlChannelOffset
;
519 GUEST_PHYSICAL_ADDRESS VirtualGuestPartitionHandle
;
521 U16 RestoreAction
; /* Restore Action field to restore the guest
523 U16 DumpAction
; /* For Windows guests it shows if the visordisk
524 * is running in dump mode */
526 U16 SavedCrashMsgCount
; /* = CONTROLVM_CRASHMSG_MAX */
527 U32 SavedCrashMsgOffset
; /* Offset to request payload area needed
529 U32 InstallationError
; /* Type of error encountered during
531 U32 InstallationTextId
; /* Id of string to display */
532 U16 InstallationRemainingSteps
; /* Number of remaining installation
533 * steps (for progress bars) */
534 U8 ToolAction
; /* ULTRA_TOOL_ACTIONS Installation Action
536 U8 Reserved
; /* alignment */
537 ULTRA_EFI_SPAR_INDICATION EfiSparIndication
;
538 ULTRA_EFI_SPAR_INDICATION EfiSparIndicationSupported
;
540 U8 Reserved2
[28]; /* Force signals to begin on 128-byte cache
542 SIGNAL_QUEUE_HEADER RequestQueue
; /* Service or guest partition
543 * uses this queue to send
544 * requests to Control */
545 SIGNAL_QUEUE_HEADER ResponseQueue
; /* Control uses this queue to
546 * respond to service or guest
547 * partition requests */
548 SIGNAL_QUEUE_HEADER EventQueue
; /* Control uses this queue to
549 * send events to service or
551 SIGNAL_QUEUE_HEADER EventAckQueue
; /* Service or guest partition
552 * uses this queue to ack
555 /* Request fixed-size message pool - does not include payload */
556 CONTROLVM_MESSAGE RequestMsg
[CONTROLVM_MESSAGE_MAX
];
558 /* Response fixed-size message pool - does not include payload */
559 CONTROLVM_MESSAGE ResponseMsg
[CONTROLVM_MESSAGE_MAX
];
561 /* Event fixed-size message pool - does not include payload */
562 CONTROLVM_MESSAGE EventMsg
[CONTROLVM_MESSAGE_MAX
];
564 /* Ack fixed-size message pool - does not include payload */
565 CONTROLVM_MESSAGE EventAckMsg
[CONTROLVM_MESSAGE_MAX
];
567 /* Message stored during IOVM creation to be reused after crash */
568 CONTROLVM_MESSAGE SavedCrashMsg
[CONTROLVM_CRASHMSG_MAX
];
569 } ULTRA_CONTROLVM_CHANNEL_PROTOCOL
;
571 /* Offsets for VM channel attributes... */
572 #define VM_CH_REQ_QUEUE_OFFSET \
573 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, RequestQueue)
574 #define VM_CH_RESP_QUEUE_OFFSET \
575 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, ResponseQueue)
576 #define VM_CH_EVENT_QUEUE_OFFSET \
577 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventQueue)
578 #define VM_CH_ACK_QUEUE_OFFSET \
579 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventAckQueue)
580 #define VM_CH_REQ_MSG_OFFSET \
581 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, RequestMsg)
582 #define VM_CH_RESP_MSG_OFFSET \
583 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, ResponseMsg)
584 #define VM_CH_EVENT_MSG_OFFSET \
585 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventMsg)
586 #define VM_CH_ACK_MSG_OFFSET \
587 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventAckMsg)
588 #define VM_CH_CRASH_MSG_OFFSET \
589 offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, SavedCrashMsg)
591 /* The following header will be located at the beginning of PayloadVmOffset for
592 * various ControlVm commands. The receiver of a ControlVm command with a
593 * PayloadVmOffset will dereference this address and then use ConnectionOffset,
594 * InitiatorOffset, and TargetOffset to get the location of UTF-8 formatted
595 * strings that can be parsed to obtain command-specific information. The value
596 * of TotalLength should equal PayloadBytes. The format of the strings at
597 * PayloadVmOffset will take different forms depending on the message. See the
598 * following Wiki page for more information:
599 * https://ustr-linux-1.na.uis.unisys.com/spar/index.php/ControlVm_Parameters_Area
601 typedef struct _ULTRA_CONTROLVM_PARAMETERS_HEADER
{
604 U32 ConnectionOffset
;
605 U32 ConnectionLength
;
616 U32 Reserved
; /* Natural alignment */
617 } ULTRA_CONTROLVM_PARAMETERS_HEADER
;
619 #endif /* __CONTROLVMCHANNEL_H__ */