/* Define Ki scale page to be traditional 4KB page */
#define ULTRA_MEMORY_PAGE_Ki (ULTRA_MEMORY_PAGE_WORD * ULTRA_MEMORY_COUNT_Ki)
-struct ultra_segment_state {
- u16 Enabled:1; /* Bit 0: May enter other states */
- u16 Active:1; /* Bit 1: Assigned to active partition */
- u16 Alive:1; /* Bit 2: Configure message sent to
+struct spar_segment_state {
+ u16 enabled:1; /* Bit 0: May enter other states */
+ u16 active:1; /* Bit 1: Assigned to active partition */
+ u16 alive:1; /* Bit 2: Configure message sent to
* service/server */
- u16 Revoked:1; /* Bit 3: similar to partition state
+ u16 revoked:1; /* Bit 3: similar to partition state
* ShuttingDown */
- u16 Allocated:1; /* Bit 4: memory (device/port number)
+ u16 allocated:1; /* Bit 4: memory (device/port number)
* has been selected by Command */
- u16 Known:1; /* Bit 5: has been introduced to the
+ u16 known:1; /* Bit 5: has been introduced to the
* service/guest partition */
- u16 Ready:1; /* Bit 6: service/Guest partition has
+ u16 ready:1; /* Bit 6: service/Guest partition has
* responded to introduction */
- u16 Operating:1; /* Bit 7: resource is configured and
+ u16 operating:1; /* Bit 7: resource is configured and
* operating */
/* Note: don't use high bit unless we need to switch to ushort
* which is non-compliant */
};
-static const struct ultra_segment_state SegmentStateRunning = {
+
+static const struct spar_segment_state SegmentStateRunning = {
1, 1, 1, 0, 1, 1, 1, 1
};
-static const struct ultra_segment_state SegmentStatePaused = {
+
+static const struct spar_segment_state SegmentStatePaused = {
1, 1, 1, 0, 1, 1, 1, 0
};
-static const struct ultra_segment_state SegmentStateStandby = {
+
+static const struct spar_segment_state SegmentStateStandby = {
1, 1, 0, 0, 1, 1, 1, 0
};
static void controlvm_respond_chipset_init(CONTROLVM_MESSAGE_HEADER *msgHdr,
int response,
ULTRA_CHIPSET_FEATURE features);
-static void controlvm_respond_physdev_changestate(
- CONTROLVM_MESSAGE_HEADER *msgHdr, int response,
- struct ultra_segment_state state);
+static void controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER *
+ msgHdr, int response, struct spar_segment_state state);
static ssize_t toolaction_show(struct device *dev,
struct device_attribute *attr,
static void
controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER *msgHdr,
- int response, struct ultra_segment_state
- state)
+ int response, struct spar_segment_state state)
{
CONTROLVM_MESSAGE outmsg;
static void
device_changestate_responder(enum control_vm_id cmdId,
ulong busNo, ulong devNo, int response,
- struct ultra_segment_state responseState)
+ struct spar_segment_state responseState)
{
VISORCHIPSET_DEVICE_INFO *p = NULL;
CONTROLVM_MESSAGE outmsg;
}
static void
-device_epilog(u32 busNo, u32 devNo, struct ultra_segment_state state, u32 cmd,
+device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
CONTROLVM_MESSAGE_HEADER *msgHdr, int response,
BOOL needResponse, BOOL for_visorbus)
{
break;
case CONTROLVM_DEVICE_CHANGESTATE:
/* ServerReady / ServerRunning / SegmentStateRunning */
- if (state.Alive == SegmentStateRunning.Alive &&
- state.Operating == SegmentStateRunning.Operating) {
+ if (state.alive == SegmentStateRunning.alive &&
+ state.operating == SegmentStateRunning.operating) {
if (notifiers->device_resume) {
(*notifiers->device_resume) (busNo,
devNo);
}
}
/* ServerNotReady / ServerLost / SegmentStateStandby */
- else if (state.Alive == SegmentStateStandby.Alive &&
- state.Operating ==
- SegmentStateStandby.Operating) {
+ else if (state.alive == SegmentStateStandby.alive &&
+ state.operating ==
+ SegmentStateStandby.operating) {
/* technically this is standby case
* where server is lost
*/
devNo);
notified = TRUE;
}
- } else if (state.Alive == SegmentStatePaused.Alive &&
- state.Operating ==
- SegmentStatePaused.Operating) {
+ } else if (state.alive == SegmentStatePaused.alive &&
+ state.operating ==
+ SegmentStatePaused.operating) {
/* this is lite pause where channel is
* still valid just 'pause' of it
*/
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg->cmd;
ulong busNo = cmd->deviceChangeState.busNo;
ulong devNo = cmd->deviceChangeState.devNo;
- struct ultra_segment_state state = cmd->deviceChangeState.state;
+ struct spar_segment_state state = cmd->deviceChangeState.state;
VISORCHIPSET_DEVICE_INFO *pDevInfo = NULL;
int rc = CONTROLVM_RESP_SUCCESS;
sprintf(env_cmd, "SPAR_PARAHOTPLUG=1");
sprintf(env_id, "SPAR_PARAHOTPLUG_ID=%d", req->id);
sprintf(env_state, "SPAR_PARAHOTPLUG_STATE=%d",
- cmd->deviceChangeState.state.Active);
+ cmd->deviceChangeState.state.active);
sprintf(env_bus, "SPAR_PARAHOTPLUG_BUS=%d",
cmd->deviceChangeState.busNo);
sprintf(env_dev, "SPAR_PARAHOTPLUG_DEVICE=%d",
cmd->deviceChangeState.devNo & 0x7);
LOGINF("parahotplug_request_kickoff: state=%d, bdf=%d/%d/%d, id=%u\n",
- cmd->deviceChangeState.state.Active,
+ cmd->deviceChangeState.state.active,
cmd->deviceChangeState.busNo, cmd->deviceChangeState.devNo >> 3,
cmd->deviceChangeState.devNo & 7, req->id);
*/
list_del(pos);
spin_unlock(&Parahotplug_request_list_lock);
- req->msg.cmd.deviceChangeState.state.Active = active;
+ req->msg.cmd.deviceChangeState.state.active = active;
if (req->msg.hdr.Flags.responseExpected)
controlvm_respond_physdev_changestate(
&req->msg.hdr, CONTROLVM_RESP_SUCCESS,
return;
}
- if (inmsg->cmd.deviceChangeState.state.Active) {
+ if (inmsg->cmd.deviceChangeState.state.active) {
/* For enable messages, just respond with success
* right away. This is a bit of a hack, but there are
* issues with the early enable messages we get (with
LOGINF("DEVICE_CHANGESTATE for physical device (%lu,%lu, active=%lu)",
(ulong) cmd->deviceChangeState.busNo,
(ulong) cmd->deviceChangeState.devNo,
- (ulong) cmd->deviceChangeState.state.Active);
+ (ulong) cmd->deviceChangeState.state.active);
parahotplug_process_message(&inmsg);
} else {
LOGINF("DEVICE_CHANGESTATE for virtual device (%lu,%lu, state.Alive=0x%lx)",
(ulong) cmd->deviceChangeState.busNo,
(ulong) cmd->deviceChangeState.devNo,
- (ulong) cmd->deviceChangeState.state.Alive);
+ (ulong) cmd->deviceChangeState.state.alive);
/* save the hdr and cmd structures for later use */
/* when sending back the response to Command */
my_device_changestate(&inmsg);