Commit 7e5a1a76 authored by Erik Arfvidson's avatar Erik Arfvidson Committed by Greg Kroah-Hartman

staging: unisys: controlvmchannel.h comment aligment and cleanup

This patch is a comment aligment and cleanup for
controlvmchannel.h.
Signed-off-by: default avatarErik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 22a0350b
...@@ -33,10 +33,11 @@ static const uuid_le spar_controlvm_channel_protocol_uuid = ...@@ -33,10 +33,11 @@ static const uuid_le spar_controlvm_channel_protocol_uuid =
#define CONTROLVM_MESSAGE_MAX 64 #define CONTROLVM_MESSAGE_MAX 64
/* Must increment this whenever you insert or delete fields within /* Must increment this whenever you insert or delete fields within
* this channel struct. Also increment whenever you change the meaning * this channel struct. Also increment whenever you change the meaning
* of fields within this channel struct so as to break pre-existing * of fields within this channel struct so as to break pre-existing
* software. Note that you can usually add fields to the END of the * software. Note that you can usually add fields to the END of the
* channel struct withOUT needing to increment this. */ * channel struct withOUT needing to increment this.
*/
#define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID 1 #define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID 1
#define SPAR_CONTROLVM_CHANNEL_OK_CLIENT(ch) \ #define SPAR_CONTROLVM_CHANNEL_OK_CLIENT(ch) \
...@@ -49,17 +50,16 @@ static const uuid_le spar_controlvm_channel_protocol_uuid = ...@@ -49,17 +50,16 @@ static const uuid_le spar_controlvm_channel_protocol_uuid =
#define MAX_SERIAL_NUM 32 #define MAX_SERIAL_NUM 32
/* Defines for various channel queues... */ /* Defines for various channel queues */
#define CONTROLVM_QUEUE_REQUEST 0 #define CONTROLVM_QUEUE_REQUEST 0
#define CONTROLVM_QUEUE_RESPONSE 1 #define CONTROLVM_QUEUE_RESPONSE 1
#define CONTROLVM_QUEUE_EVENT 2 #define CONTROLVM_QUEUE_EVENT 2
#define CONTROLVM_QUEUE_ACK 3 #define CONTROLVM_QUEUE_ACK 3
/* Max number of messages stored during IOVM creation to be reused /* Max num of messages stored during IOVM creation to be reused after crash */
* after crash */
#define CONTROLVM_CRASHMSG_MAX 2 #define CONTROLVM_CRASHMSG_MAX 2
/** Ids for commands that may appear in either queue of a ControlVm channel. /* Ids for commands that may appear in either queue of a ControlVm channel.
* *
* Commands that are initiated by the command partition (CP), by an IO or * Commands that are initiated by the command partition (CP), by an IO or
* console service partition (SP), or by a guest partition (GP)are: * console service partition (SP), or by a guest partition (GP)are:
...@@ -98,30 +98,25 @@ enum controlvm_id { ...@@ -98,30 +98,25 @@ enum controlvm_id {
}; };
struct irq_info { struct irq_info {
/**< specifies interrupt info. It is used to send interrupts
* for this channel. The peer at the end of this channel
* who has registered an interrupt (using recv fields
* above) will receive the interrupt. Passed as a parameter
* to Issue_VMCALL_IO_QUEUE_TRANSITION, which generates the
* interrupt. Currently this is used by IOPart-SP to wake
* up GP when Data Channel transitions from empty to
* non-empty.*/
u64 reserved1; u64 reserved1;
/**< specifies interrupt handle. It is used to retrieve the /* specifies interrupt handle. It is used to retrieve the
* corresponding interrupt pin from Monitor; and the * corresponding interrupt pin from Monitor; and the
* interrupt pin is used to connect to the corresponding * interrupt pin is used to connect to the corresponding
* interrupt. Used by IOPart-GP only. */ * interrupt. Used by IOPart-GP only.
*/
u64 recv_irq_handle; u64 recv_irq_handle;
/**< specifies interrupt vector. It, interrupt pin, and shared are /* specifies interrupt vector. It, interrupt pin, and shared are
* used to connect to the corresponding interrupt. Used by * used to connect to the corresponding interrupt. Used by
* IOPart-GP only. */ * IOPart-GP only.
*/
u32 recv_irq_vector; u32 recv_irq_vector;
/**< specifies if the recvInterrupt is shared. It, interrupt pin /* specifies if the recvInterrupt is shared. It, interrupt pin
* and vector are used to connect to 0 = not shared; 1 = shared. * and vector are used to connect to 0 = not shared; 1 = shared.
* the corresponding interrupt. Used by IOPart-GP only. */ * the corresponding interrupt. Used by IOPart-GP only.
*/
u8 recv_irq_shared; u8 recv_irq_shared;
u8 reserved[3]; /* Natural alignment purposes */ u8 reserved[3]; /* Natural alignment purposes */
}; };
...@@ -148,7 +143,7 @@ enum ultra_chipset_feature { ...@@ -148,7 +143,7 @@ enum ultra_chipset_feature {
ULTRA_CHIPSET_FEATURE_PCIVBUS = 0x00000004 ULTRA_CHIPSET_FEATURE_PCIVBUS = 0x00000004
}; };
/** This is the common structure that is at the beginning of every /* This is the common structure that is at the beginning of every
* ControlVm message (both commands and responses) in any ControlVm * ControlVm message (both commands and responses) in any ControlVm
* queue. Commands are easily distinguished from responses by * queue. Commands are easily distinguished from responses by
* looking at the flags.response field. * looking at the flags.response field.
...@@ -165,25 +160,25 @@ struct controlvm_message_header { ...@@ -165,25 +160,25 @@ struct controlvm_message_header {
u32 completion_status; /* Error status code or result of u32 completion_status; /* Error status code or result of
* message completion */ * message completion */
struct { struct {
u32 failed:1; /**< =1 in a response to * signify u32 failed:1; /* =1 in a response to * signify
* failure */ * failure */
u32 response_expected:1; /**< =1 in all messages that expect a u32 response_expected:1; /* =1 in all messages that expect a
* response (Control ignores this * response (Control ignores this
* bit) */ * bit) */
u32 server:1; /**< =1 in all bus & device-related u32 server:1; /* =1 in all bus & device-related
* messages where the message * messages where the message
* receiver is to act as the bus or * receiver is to act as the bus or
* device server */ * device server */
u32 test_message:1; /**< =1 for testing use only u32 test_message:1; /* =1 for testing use only
* (Control and Command ignore this * (Control and Command ignore this
* bit) */ * bit) */
u32 partial_completion:1; /**< =1 if there are forthcoming u32 partial_completion:1; /* =1 if there are forthcoming
* responses/acks associated * responses/acks associated
* with this message */ * with this message */
u32 preserve:1; /**< =1 this is to let us know to u32 preserve:1; /* =1 this is to let us know to
* preserve channel contents * preserve channel contents
* (for running guests)*/ * (for running guests)*/
u32 writer_in_diag:1; /**< =1 the DiagWriter is active in the u32 writer_in_diag:1; /* =1 the DiagWriter is active in the
* Diagnostic Partition*/ * Diagnostic Partition*/
} flags; } flags;
u32 reserved; /* Natural alignment */ u32 reserved; /* Natural alignment */
...@@ -212,11 +207,10 @@ struct controlvm_packet_device_create { ...@@ -212,11 +207,10 @@ struct controlvm_packet_device_create {
}; /* for CONTROLVM_DEVICE_CREATE */ }; /* for CONTROLVM_DEVICE_CREATE */
struct controlvm_packet_device_configure { struct controlvm_packet_device_configure {
u32 bus_no; /**< bus # (0..n-1) from the msg u32 bus_no; /* bus # (0..n-1) from the msg
* receiver's perspective */ * receiver's perspective */
/* Control uses header SegmentIndex field to access bus number... */ /* Control uses header SegmentIndex field to access bus number... */
u32 dev_no; /**< bus-relative (0..n-1) device number */ u32 dev_no; /* bus-relative (0..n-1) device number */
} ; /* for CONTROLVM_DEVICE_CONFIGURE */ } ; /* for CONTROLVM_DEVICE_CONFIGURE */
struct controlvm_message_device_create { struct controlvm_message_device_create {
...@@ -346,24 +340,15 @@ struct guest_devices { ...@@ -346,24 +340,15 @@ struct guest_devices {
struct spar_controlvm_channel_protocol { struct spar_controlvm_channel_protocol {
struct channel_header header; struct channel_header header;
u64 gp_controlvm; /* guest physical address of u64 gp_controlvm; /* guest phys addr of this channel */
* this channel */ u64 gp_partition_tables;/* guest phys addr of partition tables */
u64 gp_partition_tables;/* guest physical address of u64 gp_diag_guest; /* guest phys addr of diagnostic channel */
* partition tables */ u64 gp_boot_romdisk;/* guest phys addr of (read* only) Boot ROM disk */
u64 gp_diag_guest; /* guest physical address of u64 gp_boot_ramdisk;/* guest phys addr of writable Boot RAM disk */
* diagnostic channel */ u64 gp_acpi_table; /* guest phys addr of acpi table */
u64 gp_boot_romdisk;/* guest phys addr of (read u64 gp_control_channel;/* guest phys addr of control channel */
* only) Boot ROM disk */ u64 gp_diag_romdisk;/* guest phys addr of diagnostic ROM disk */
u64 gp_boot_ramdisk;/* guest phys addr of writable u64 gp_nvram; /* guest phys addr of NVRAM channel */
* Boot RAM disk */
u64 gp_acpi_table; /* guest phys addr of acpi
* table */
u64 gp_control_channel;/* guest phys addr of control
* channel */
u64 gp_diag_romdisk;/* guest phys addr of diagnostic
* ROM disk */
u64 gp_nvram; /* guest phys addr of NVRAM
* channel */
u64 request_payload_offset; /* Offset to request payload area */ u64 request_payload_offset; /* Offset to request payload area */
u64 event_payload_offset; /* Offset to event payload area */ u64 event_payload_offset; /* Offset to event payload area */
u32 request_payload_bytes; /* Bytes available in request payload u32 request_payload_bytes; /* Bytes available in request payload
...@@ -373,10 +358,8 @@ struct spar_controlvm_channel_protocol { ...@@ -373,10 +358,8 @@ struct spar_controlvm_channel_protocol {
u32 nvram_channel_bytes; /* Bytes in PartitionNvram segment */ u32 nvram_channel_bytes; /* Bytes in PartitionNvram segment */
u32 message_bytes; /* sizeof(CONTROLVM_MESSAGE) */ u32 message_bytes; /* sizeof(CONTROLVM_MESSAGE) */
u32 message_count; /* CONTROLVM_MESSAGE_MAX */ u32 message_count; /* CONTROLVM_MESSAGE_MAX */
u64 gp_smbios_table;/* guest phys addr of SMBIOS u64 gp_smbios_table; /* guest phys addr of SMBIOS tables */
* tables */ u64 gp_physical_smbios_table; /* guest phys addr of SMBIOS table */
u64 gp_physical_smbios_table;/* guest phys addr of
* SMBIOS table */
/* ULTRA_MAX_GUESTS_PER_SERVICE */ /* ULTRA_MAX_GUESTS_PER_SERVICE */
struct guest_devices gp_obsolete_guest_devices[16]; struct guest_devices gp_obsolete_guest_devices[16];
...@@ -446,7 +429,7 @@ struct spar_controlvm_channel_protocol { ...@@ -446,7 +429,7 @@ struct spar_controlvm_channel_protocol {
struct controlvm_message saved_crash_msg[CONTROLVM_CRASHMSG_MAX]; struct controlvm_message saved_crash_msg[CONTROLVM_CRASHMSG_MAX];
}; };
/* Offsets for VM channel attributes... */ /* Offsets for VM channel attributes */
#define VM_CH_REQ_QUEUE_OFFSET \ #define VM_CH_REQ_QUEUE_OFFSET \
offsetof(struct spar_controlvm_channel_protocol, request_queue) offsetof(struct spar_controlvm_channel_protocol, request_queue)
#define VM_CH_RESP_QUEUE_OFFSET \ #define VM_CH_RESP_QUEUE_OFFSET \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment