^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright (C) 2010 - 2015 UNISYS CORPORATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #ifndef __CONTROLVMCHANNEL_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define __CONTROLVMCHANNEL_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/uuid.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/visorbus.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) /* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #define VISOR_CONTROLVM_CHANNEL_GUID \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) GUID_INIT(0x2b3c2d10, 0x7ef5, 0x4ad8, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 0xb9, 0x66, 0x34, 0x48, 0xb7, 0x38, 0x6b, 0x3d)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define CONTROLVM_MESSAGE_MAX 64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) * Must increment this whenever you insert or delete fields within this channel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) * struct. Also increment whenever you change the meaning of fields within this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) * channel struct so as to break pre-existing software. Note that you can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) * usually add fields to the END of the channel struct withOUT needing to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) * increment this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define VISOR_CONTROLVM_CHANNEL_VERSIONID 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) /* Defines for various channel queues */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #define CONTROLVM_QUEUE_REQUEST 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define CONTROLVM_QUEUE_RESPONSE 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define CONTROLVM_QUEUE_EVENT 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #define CONTROLVM_QUEUE_ACK 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) /* Max num of messages stored during IOVM creation to be reused after crash */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #define CONTROLVM_CRASHMSG_MAX 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) * struct visor_segment_state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) * @enabled: May enter other states.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) * @active: Assigned to active partition.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) * @alive: Configure message sent to service/server.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) * @revoked: Similar to partition state ShuttingDown.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) * @allocated: Memory (device/port number) has been selected by Command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) * @known: Has been introduced to the service/guest partition.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) * @ready: Service/Guest partition has responded to introduction.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) * @operating: Resource is configured and operating.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) * @reserved: Natural alignment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) * Note: Don't use high bit unless we need to switch to ushort which is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) * non-compliant.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) struct visor_segment_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) u16 enabled:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) u16 active:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) u16 alive:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) u16 revoked:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) u16 allocated:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) u16 known:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) u16 ready:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) u16 operating:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) u16 reserved:8;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) static const struct visor_segment_state segment_state_running = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 1, 1, 1, 0, 1, 1, 1, 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) static const struct visor_segment_state segment_state_paused = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) 1, 1, 1, 0, 1, 1, 1, 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) static const struct visor_segment_state segment_state_standby = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) 1, 1, 0, 0, 1, 1, 1, 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) * enum controlvm_id
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) * @CONTROLVM_INVALID:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) * @CONTROLVM_BUS_CREATE: CP --> SP, GP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) * @CONTROLVM_BUS_DESTROY: CP --> SP, GP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) * @CONTROLVM_BUS_CONFIGURE: CP --> SP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) * @CONTROLVM_BUS_CHANGESTATE: CP --> SP, GP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) * @CONTROLVM_BUS_CHANGESTATE_EVENT: SP, GP --> CP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) * @CONTROLVM_DEVICE_CREATE: CP --> SP, GP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) * @CONTROLVM_DEVICE_DESTROY: CP --> SP, GP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) * @CONTROLVM_DEVICE_CONFIGURE: CP --> SP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) * @CONTROLVM_DEVICE_CHANGESTATE: CP --> SP, GP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) * @CONTROLVM_DEVICE_CHANGESTATE_EVENT: SP, GP --> CP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) * @CONTROLVM_DEVICE_RECONFIGURE: CP --> Boot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) * @CONTROLVM_CHIPSET_INIT: CP --> SP, GP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) * @CONTROLVM_CHIPSET_STOP: CP --> SP, GP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) * @CONTROLVM_CHIPSET_READY: CP --> SP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) * @CONTROLVM_CHIPSET_SELFTEST: CP --> SP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) * Ids for commands that may appear in either queue of a ControlVm channel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) * Commands that are initiated by the command partition (CP), by an IO or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) * console service partition (SP), or by a guest partition (GP) are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) * - issued on the RequestQueue queue (q #0) in the ControlVm channel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) * - responded to on the ResponseQueue queue (q #1) in the ControlVm channel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) * Events that are initiated by an IO or console service partition (SP) or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) * by a guest partition (GP) are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) * - issued on the EventQueue queue (q #2) in the ControlVm channel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) * - responded to on the EventAckQueue queue (q #3) in the ControlVm channel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) enum controlvm_id {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) CONTROLVM_INVALID = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) * SWITCH commands required Parameter: SwitchNumber.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) * BUS commands required Parameter: BusNumber
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) CONTROLVM_BUS_CREATE = 0x101,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) CONTROLVM_BUS_DESTROY = 0x102,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) CONTROLVM_BUS_CONFIGURE = 0x104,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) CONTROLVM_BUS_CHANGESTATE = 0x105,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) CONTROLVM_BUS_CHANGESTATE_EVENT = 0x106,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) /* DEVICE commands required Parameter: BusNumber, DeviceNumber */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) CONTROLVM_DEVICE_CREATE = 0x201,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) CONTROLVM_DEVICE_DESTROY = 0x202,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) CONTROLVM_DEVICE_CONFIGURE = 0x203,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) CONTROLVM_DEVICE_CHANGESTATE = 0x204,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) CONTROLVM_DEVICE_CHANGESTATE_EVENT = 0x205,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) CONTROLVM_DEVICE_RECONFIGURE = 0x206,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) /* CHIPSET commands */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) CONTROLVM_CHIPSET_INIT = 0x301,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) CONTROLVM_CHIPSET_STOP = 0x302,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) CONTROLVM_CHIPSET_READY = 0x304,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) CONTROLVM_CHIPSET_SELFTEST = 0x305,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) * struct irq_info
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) * @reserved1: Natural alignment purposes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) * @recv_irq_handle: Specifies interrupt handle. It is used to retrieve the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) * corresponding interrupt pin from Monitor; and the interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) * pin is used to connect to the corresponding interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) * Used by IOPart-GP only.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) * @recv_irq_vector: Specifies interrupt vector. It, interrupt pin, and shared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) * are used to connect to the corresponding interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) * Used by IOPart-GP only.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) * @recv_irq_shared: Specifies if the recvInterrupt is shared. It, interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) * pin and vector are used to connect to 0 = not shared;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) * 1 = shared the corresponding interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) * Used by IOPart-GP only.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) * @reserved: Natural alignment purposes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) struct irq_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) u64 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) u64 recv_irq_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) u32 recv_irq_vector;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) u8 recv_irq_shared;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) u8 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) * struct efi_visor_indication
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) * @boot_to_fw_ui: Stop in UEFI UI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) * @clear_nvram: Clear NVRAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) * @clear_cmos: Clear CMOS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) * @boot_to_tool: Run install tool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) * @reserved: Natural alignment
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) struct efi_visor_indication {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) u64 boot_to_fw_ui:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) u64 clear_nvram:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) u64 clear_cmos:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) u64 boot_to_tool:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) /* Remaining bits are available */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) u64 reserved:60;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) enum visor_chipset_feature {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) VISOR_CHIPSET_FEATURE_REPLY = 0x00000001,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) VISOR_CHIPSET_FEATURE_PARA_HOTPLUG = 0x00000002,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) * struct controlvm_message_header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) * @id: See CONTROLVM_ID.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) * @message_size: Includes size of this struct + size of message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) * @segment_index: Index of segment containing Vm message/information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) * @completion_status: Error status code or result of message completion.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) * @struct flags:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) * @failed: =1 in a response to signify failure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) * @response_expected: =1 in all messages that expect a response.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) * @server: =1 in all bus & device-related messages where the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) * message receiver is to act as the bus or device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) * server.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) * @test_message: =1 for testing use only (Control and Command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) * ignore this).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) * @partial_completion: =1 if there are forthcoming responses/acks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) * associated with this message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) * @preserve: =1 this is to let us know to preserve channel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) * contents.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) * @writer_in_diag: =1 the DiagWriter is active in the Diagnostic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) * Partition.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) * @reserve: Natural alignment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) * @reserved: Natural alignment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) * @message_handle: Identifies the particular message instance.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) * @payload_vm_offset: Offset of payload area from start of this instance.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) * @payload_max_bytes: Maximum bytes allocated in payload area of ControlVm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) * segment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) * @payload_bytes: Actual number of bytes of payload area to copy between
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) * IO/Command. If non-zero, there is a payload to copy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) * This is the common structure that is at the beginning of every
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) * ControlVm message (both commands and responses) in any ControlVm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) * queue. Commands are easily distinguished from responses by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) * looking at the flags.response field.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) struct controlvm_message_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) u32 id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) * For requests, indicates the message type. For responses, indicates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) * the type of message we are responding to.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) u32 message_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) u32 segment_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) u32 completion_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) u32 failed:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) u32 response_expected:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) u32 server:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) u32 test_message:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) u32 partial_completion:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) u32 preserve:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) u32 writer_in_diag:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) u32 reserve:25;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) } __packed flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) u64 message_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) u64 payload_vm_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) u32 payload_max_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) u32 payload_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) * struct controlvm_packet_device_create - For CONTROLVM_DEVICE_CREATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) * @bus_no: Bus # (0..n-1) from the msg receiver's end.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) * @dev_no: Bus-relative (0..n-1) device number.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) * @channel_addr: Guest physical address of the channel, which can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) * dereferenced by the receiver of this ControlVm command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) * @channel_bytes: Specifies size of the channel in bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) * @data_type_uuid: Specifies format of data in channel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) * @dev_inst_uuid: Instance guid for the device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) * @irq_info intr: Specifies interrupt information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) struct controlvm_packet_device_create {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) u32 dev_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) u64 channel_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) u64 channel_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) guid_t data_type_guid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) guid_t dev_inst_guid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) struct irq_info intr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) * struct controlvm_packet_device_configure - For CONTROLVM_DEVICE_CONFIGURE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) * @bus_no: Bus number (0..n-1) from the msg receiver's perspective.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) * @dev_no: Bus-relative (0..n-1) device number.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) struct controlvm_packet_device_configure {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) u32 dev_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) /* Total 128 bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) struct controlvm_message_device_create {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) struct controlvm_message_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) struct controlvm_packet_device_create packet;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) /* Total 56 bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) struct controlvm_message_device_configure {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) struct controlvm_message_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) struct controlvm_packet_device_configure packet;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) * struct controlvm_message_packet - This is the format for a message in any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) * ControlVm queue.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) * @struct create_bus: For CONTROLVM_BUS_CREATE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) * @bus_no: Bus # (0..n-1) from the msg receiver's perspective.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) * @dev_count: Indicates the max number of devices on this bus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) * @channel_addr: Guest physical address of the channel, which can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) * dereferenced by the receiver of this ControlVM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) * command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) * @channel_bytes: Size of the channel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) * @bus_data_type_uuid: Indicates format of data in bus channel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) * @bus_inst_uuid: Instance uuid for the bus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) * @struct destroy_bus: For CONTROLVM_BUS_DESTROY.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) * @bus_no: Bus # (0..n-1) from the msg receiver's perspective.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) * @reserved: Natural alignment purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) * @struct configure_bus: For CONTROLVM_BUS_CONFIGURE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) * @bus_no: Bus # (0..n-1) from the receiver's perspective.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) * @reserved1: For alignment purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) * @guest_handle: This is used to convert guest physical address to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) * physical address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) * @recv_bus_irq_handle: Specifies interrupt info. It is used by SP to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) * register to receive interrupts from the CP. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) * interrupt is used for bus level notifications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) * The corresponding sendBusInterruptHandle is kept
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) * in CP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) * @struct create_device: For CONTROLVM_DEVICE_CREATE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) * @struct destroy_device: For CONTROLVM_DEVICE_DESTROY.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) * @bus_no: Bus # (0..n-1) from the msg receiver's perspective.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) * @dev_no: Bus-relative (0..n-1) device number.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) * @struct configure_device: For CONTROLVM_DEVICE_CONFIGURE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) * @struct reconfigure_device: For CONTROLVM_DEVICE_RECONFIGURE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) * @bus_no: Bus # (0..n-1) from the msg receiver's perspective.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) * @dev_no: Bus-relative (0..n-1) device number.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) * @struct bus_change_state: For CONTROLVM_BUS_CHANGESTATE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) * @bus_no:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) * @struct state:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) * @reserved: Natural alignment purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) * @struct device_change_state: For CONTROLVM_DEVICE_CHANGESTATE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) * @bus_no:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) * @dev_no:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) * @struct state:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) * @struct flags:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) * @phys_device: =1 if message is for a physical device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) * @reserved: Natural alignment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) * @reserved1: Natural alignment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) * @reserved: Natural alignment purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) * @struct device_change_state_event: For CONTROLVM_DEVICE_CHANGESTATE_EVENT.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) * @bus_no:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) * @dev_no:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) * @struct state:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) * @reserved: Natural alignment purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) * @struct init_chipset: For CONTROLVM_CHIPSET_INIT.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) * @bus_count: Indicates the max number of busses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) * @switch_count: Indicates the max number of switches.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) * @enum features:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) * @platform_number:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) * @struct chipset_selftest: For CONTROLVM_CHIPSET_SELFTEST.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) * @options: Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) * @test: Bit 0 set to run embedded selftest.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) * @addr: A physical address of something, that can be dereferenced by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) * receiver of this ControlVm command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) * @handle: A handle of something (depends on command id).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) struct controlvm_message_packet {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) u32 dev_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) u64 channel_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) u64 channel_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) guid_t bus_data_type_guid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) guid_t bus_inst_guid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) } __packed create_bus;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) } __packed destroy_bus;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) u32 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) u64 guest_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) u64 recv_bus_irq_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) } __packed configure_bus;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) struct controlvm_packet_device_create create_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) u32 dev_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) } __packed destroy_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) struct controlvm_packet_device_configure configure_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) u32 dev_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) } __packed reconfigure_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) struct visor_segment_state state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) u8 reserved[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) } __packed bus_change_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) u32 dev_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) struct visor_segment_state state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) u32 phys_device:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) u32 reserved:31;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) u32 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) } __packed flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) u8 reserved[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) } __packed device_change_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) u32 bus_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) u32 dev_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) struct visor_segment_state state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) u8 reserved[6];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) } __packed device_change_state_event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) u32 bus_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) u32 switch_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) enum visor_chipset_feature features;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) u32 platform_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) } __packed init_chipset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) u32 options;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) u32 test;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) } __packed chipset_selftest;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) u64 addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) u64 handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) /* All messages in any ControlVm queue have this layout. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) struct controlvm_message {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) struct controlvm_message_header hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) struct controlvm_message_packet cmd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) * struct visor_controlvm_channel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) * @struct header:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) * @gp_controlvm: Guest phys addr of this channel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) * @gp_partition_tables: Guest phys addr of partition tables.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) * @gp_diag_guest: Guest phys addr of diagnostic channel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) * @gp_boot_romdisk: Guest phys addr of (read* only) Boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) * ROM disk.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) * @gp_boot_ramdisk: Guest phys addr of writable Boot RAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) * disk.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) * @gp_acpi_table: Guest phys addr of acpi table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) * @gp_control_channel: Guest phys addr of control channel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) * @gp_diag_romdisk: Guest phys addr of diagnostic ROM disk.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) * @gp_nvram: Guest phys addr of NVRAM channel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) * @request_payload_offset: Offset to request payload area.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) * @event_payload_offset: Offset to event payload area.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) * @request_payload_bytes: Bytes available in request payload area.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) * @event_payload_bytes: Bytes available in event payload area.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) * @control_channel_bytes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) * @nvram_channel_bytes: Bytes in PartitionNvram segment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) * @message_bytes: sizeof(CONTROLVM_MESSAGE).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) * @message_count: CONTROLVM_MESSAGE_MAX.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) * @gp_smbios_table: Guest phys addr of SMBIOS tables.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) * @gp_physical_smbios_table: Guest phys addr of SMBIOS table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) * @gp_reserved: VISOR_MAX_GUESTS_PER_SERVICE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) * @virtual_guest_firmware_image_base: Guest physical address of EFI firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) * image base.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) * @virtual_guest_firmware_entry_point: Guest physical address of EFI firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) * entry point.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) * @virtual_guest_firmware_image_size: Guest EFI firmware image size.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) * @virtual_guest_firmware_boot_base: GPA = 1MB where EFI firmware image is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) * copied to.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) * @virtual_guest_image_base:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) * @virtual_guest_image_size:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) * @prototype_control_channel_offset:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) * @virtual_guest_partition_handle:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) * @restore_action: Restore Action field to restore the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) * guest partition.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) * @dump_action: For Windows guests it shows if the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) * visordisk is in dump mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) * @nvram_fail_count:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) * @saved_crash_message_count: = CONTROLVM_CRASHMSG_MAX.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) * @saved_crash_message_offset: Offset to request payload area needed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) * for crash dump.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) * @installation_error: Type of error encountered during
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) * installation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) * @installation_text_id: Id of string to display.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) * @installation_remaining_steps: Number of remaining installation steps
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) * (for progress bars).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) * @tool_action: VISOR_TOOL_ACTIONS Installation Action
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) * field.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) * @reserved: Alignment.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) * @struct efi_visor_ind:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) * @sp_reserved:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) * @reserved2: Force signals to begin on 128-byte
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) * cache line.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) * @struct request_queue: Guest partition uses this queue to send
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) * requests to Control.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) * @struct response_queue: Control uses this queue to respond to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) * service or guest partition request.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) * @struct event_queue: Control uses this queue to send events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) * to guest partition.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) * @struct event_ack_queue: Service or guest partition uses this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) * queue to ack Control events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) * @struct request_msg: Request fixed-size message pool -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) * does not include payload.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) * @struct response_msg: Response fixed-size message pool -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) * does not include payload.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) * @struct event_msg: Event fixed-size message pool -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) * does not include payload.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) * @struct event_ack_msg: Ack fixed-size message pool -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) * does not include payload.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) * @struct saved_crash_msg: Message stored during IOVM creation to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) * be reused after crash.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) struct visor_controlvm_channel {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) struct channel_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) u64 gp_controlvm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) u64 gp_partition_tables;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) u64 gp_diag_guest;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) u64 gp_boot_romdisk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) u64 gp_boot_ramdisk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) u64 gp_acpi_table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) u64 gp_control_channel;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) u64 gp_diag_romdisk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) u64 gp_nvram;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) u64 request_payload_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) u64 event_payload_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) u32 request_payload_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) u32 event_payload_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) u32 control_channel_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) u32 nvram_channel_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) u32 message_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) u32 message_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) u64 gp_smbios_table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) u64 gp_physical_smbios_table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) char gp_reserved[2688];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) u64 virtual_guest_firmware_image_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) u64 virtual_guest_firmware_entry_point;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) u64 virtual_guest_firmware_image_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) u64 virtual_guest_firmware_boot_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532) u64 virtual_guest_image_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) u64 virtual_guest_image_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) u64 prototype_control_channel_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) u64 virtual_guest_partition_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) u16 restore_action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) u16 dump_action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) u16 nvram_fail_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) u16 saved_crash_message_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) u32 saved_crash_message_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) u32 installation_error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) u32 installation_text_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) u16 installation_remaining_steps;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) u8 tool_action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) struct efi_visor_indication efi_visor_ind;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) u32 sp_reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) u8 reserved2[28];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) struct signal_queue_header request_queue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) struct signal_queue_header response_queue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) struct signal_queue_header event_queue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) struct signal_queue_header event_ack_queue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) struct controlvm_message request_msg[CONTROLVM_MESSAGE_MAX];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) struct controlvm_message response_msg[CONTROLVM_MESSAGE_MAX];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) struct controlvm_message event_msg[CONTROLVM_MESSAGE_MAX];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) struct controlvm_message event_ack_msg[CONTROLVM_MESSAGE_MAX];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) struct controlvm_message saved_crash_msg[CONTROLVM_CRASHMSG_MAX];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) * struct visor_controlvm_parameters_header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) * The following header will be located at the beginning of PayloadVmOffset for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) * various ControlVm commands. The receiver of a ControlVm command with a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) * PayloadVmOffset will dereference this address and then use connection_offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) * initiator_offset, and target_offset to get the location of UTF-8 formatted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) * strings that can be parsed to obtain command-specific information. The value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) * of total_length should equal PayloadBytes. The format of the strings at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) * PayloadVmOffset will take different forms depending on the message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) struct visor_controlvm_parameters_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) u32 total_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) u32 header_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) u32 connection_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) u32 connection_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) u32 initiator_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) u32 initiator_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) u32 target_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) u32 target_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) u32 client_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) u32 client_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) u32 name_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) u32 name_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) guid_t id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) u32 revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) /* Natural alignment */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587) u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) /* General Errors------------------------------------------------------[0-99] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) #define CONTROLVM_RESP_SUCCESS 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) #define CONTROLVM_RESP_ALREADY_DONE 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593) #define CONTROLVM_RESP_IOREMAP_FAILED 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) #define CONTROLVM_RESP_KMALLOC_FAILED 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) #define CONTROLVM_RESP_ID_UNKNOWN 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) #define CONTROLVM_RESP_ID_INVALID_FOR_CLIENT 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) /* CONTROLVM_INIT_CHIPSET-------------------------------------------[100-199] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598) #define CONTROLVM_RESP_CLIENT_SWITCHCOUNT_NONZERO 100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) #define CONTROLVM_RESP_EXPECTED_CHIPSET_INIT 101
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) /* Maximum Limit----------------------------------------------------[200-299] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) /* BUS_CREATE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) #define CONTROLVM_RESP_ERROR_MAX_BUSES 201
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) /* DEVICE_CREATE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) #define CONTROLVM_RESP_ERROR_MAX_DEVICES 202
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) /* Payload and Parameter Related------------------------------------[400-499] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) /* SWITCH_ATTACHEXTPORT, DEVICE_CONFIGURE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) #define CONTROLVM_RESP_PAYLOAD_INVALID 400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) /* Multiple */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) #define CONTROLVM_RESP_INITIATOR_PARAMETER_INVALID 401
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) /* DEVICE_CONFIGURE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) #define CONTROLVM_RESP_TARGET_PARAMETER_INVALID 402
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) /* DEVICE_CONFIGURE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) #define CONTROLVM_RESP_CLIENT_PARAMETER_INVALID 403
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) /* Specified[Packet Structure] Value--------------------------------[500-599] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) /* SWITCH_ATTACHINTPORT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616) /* BUS_CONFIGURE, DEVICE_CREATE, DEVICE_CONFIG, DEVICE_DESTROY */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) #define CONTROLVM_RESP_BUS_INVALID 500
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) /* SWITCH_ATTACHINTPORT*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) /* DEVICE_CREATE, DEVICE_CONFIGURE, DEVICE_DESTROY */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) #define CONTROLVM_RESP_DEVICE_INVALID 501
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) /* DEVICE_CREATE, DEVICE_CONFIGURE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) #define CONTROLVM_RESP_CHANNEL_INVALID 502
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) /* Partition Driver Callback Interface------------------------------[600-699] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) /* BUS_CREATE, BUS_DESTROY, DEVICE_CREATE, DEVICE_DESTROY */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) #define CONTROLVM_RESP_VIRTPCI_DRIVER_FAILURE 604
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) /* Unable to invoke VIRTPCI callback. VIRTPCI Callback returned error. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627) /* BUS_CREATE, BUS_DESTROY, DEVICE_CREATE, DEVICE_DESTROY */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) #define CONTROLVM_RESP_VIRTPCI_DRIVER_CALLBACK_ERROR 605
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) /* Generic device callback returned error. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) /* SWITCH_ATTACHEXTPORT, SWITCH_DETACHEXTPORT, DEVICE_CONFIGURE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) #define CONTROLVM_RESP_GENERIC_DRIVER_CALLBACK_ERROR 606
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) /* Bus Related------------------------------------------------------[700-799] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) /* BUS_DESTROY */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) #define CONTROLVM_RESP_ERROR_BUS_DEVICE_ATTACHED 700
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) /* Channel Related--------------------------------------------------[800-899] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) /* GET_CHANNELINFO, DEVICE_DESTROY */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) #define CONTROLVM_RESP_CHANNEL_TYPE_UNKNOWN 800
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) /* DEVICE_CREATE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) #define CONTROLVM_RESP_CHANNEL_SIZE_TOO_SMALL 801
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) /* Chipset Shutdown Related---------------------------------------[1000-1099] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) #define CONTROLVM_RESP_CHIPSET_SHUTDOWN_FAILED 1000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642) #define CONTROLVM_RESP_CHIPSET_SHUTDOWN_ALREADY_ACTIVE 1001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) /* Chipset Stop Related-------------------------------------------[1100-1199] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) #define CONTROLVM_RESP_CHIPSET_STOP_FAILED_BUS 1100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) #define CONTROLVM_RESP_CHIPSET_STOP_FAILED_SWITCH 1101
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) /* Device Related-------------------------------------------------[1400-1499] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) #define CONTROLVM_RESP_DEVICE_UDEV_TIMEOUT 1400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) /* __CONTROLVMCHANNEL_H__ */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) #endif