Lines Matching refs:inmsg

310 static int chipset_init(struct controlvm_message *inmsg)
328 features = inmsg->cmd.init_chipset.features &
333 if (inmsg->hdr.flags.response_expected)
334 res = controlvm_respond_chipset_init(&inmsg->hdr, rc, features);
447 static int visorbus_create(struct controlvm_message *inmsg)
449 struct controlvm_message_packet *cmd = &inmsg->cmd;
472 err = save_crash_message(inmsg, CRASH_BUS);
476 if (inmsg->hdr.flags.response_expected == 1) {
482 memcpy(pmsg_hdr, &inmsg->hdr,
511 if (inmsg->hdr.flags.response_expected == 1)
512 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err);
516 static int visorbus_destroy(struct controlvm_message *inmsg)
519 u32 bus_no = inmsg->cmd.destroy_bus.bus_no;
537 if (inmsg->hdr.flags.response_expected == 1) {
543 memcpy(pmsg_hdr, &inmsg->hdr,
552 if (inmsg->hdr.flags.response_expected == 1)
553 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err);
592 static int visorbus_configure(struct controlvm_message *inmsg,
595 struct controlvm_message_packet *cmd = &inmsg->cmd;
624 if (inmsg->hdr.flags.response_expected == 1)
625 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err);
631 if (inmsg->hdr.flags.response_expected == 1)
632 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err);
636 static int visorbus_device_create(struct controlvm_message *inmsg)
638 struct controlvm_message_packet *cmd = &inmsg->cmd;
693 err = save_crash_message(inmsg, CRASH_DEV);
697 if (inmsg->hdr.flags.response_expected == 1) {
703 memcpy(pmsg_hdr, &inmsg->hdr,
721 if (inmsg->hdr.flags.response_expected == 1)
722 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err);
726 static int visorbus_device_changestate(struct controlvm_message *inmsg)
728 struct controlvm_message_packet *cmd = &inmsg->cmd;
751 if (inmsg->hdr.flags.response_expected == 1) {
757 memcpy(pmsg_hdr, &inmsg->hdr,
779 if (inmsg->hdr.flags.response_expected == 1)
780 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err);
784 static int visorbus_device_destroy(struct controlvm_message *inmsg)
786 struct controlvm_message_packet *cmd = &inmsg->cmd;
807 if (inmsg->hdr.flags.response_expected == 1) {
814 memcpy(pmsg_hdr, &inmsg->hdr,
823 if (inmsg->hdr.flags.response_expected == 1)
824 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err);
1063 * @inmsg: the message indicating whether to enable or disable
1065 static int parahotplug_process_message(struct controlvm_message *inmsg)
1070 req = parahotplug_request_create(inmsg);
1077 if (inmsg->cmd.device_change_state.state.active) {
1081 controlvm_respond(&inmsg->hdr, CONTROLVM_RESP_SUCCESS,
1082 &inmsg->cmd.device_change_state.state);
1100 controlvm_respond(&inmsg->hdr, err,
1101 &inmsg->cmd.device_change_state.state);
1351 * @inmsg: the message to process
1362 static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
1364 struct controlvm_message_packet *cmd = &inmsg.cmd;
1372 parm_addr = channel_addr + inmsg.hdr.payload_vm_offset;
1373 parm_bytes = inmsg.hdr.payload_bytes;
1386 controlvm_init_response(&ackmsg, &inmsg.hdr, CONTROLVM_RESP_SUCCESS);
1391 switch (inmsg.hdr.id) {
1393 err = chipset_init(&inmsg);
1396 err = visorbus_create(&inmsg);
1399 err = visorbus_destroy(&inmsg);
1402 err = visorbus_configure(&inmsg, parser_ctx);
1405 err = visorbus_device_create(&inmsg);
1409 err = parahotplug_process_message(&inmsg);
1415 err = visorbus_device_changestate(&inmsg);
1420 err = visorbus_device_destroy(&inmsg);
1424 if (inmsg.hdr.flags.response_expected)
1425 controlvm_respond(&inmsg.hdr, CONTROLVM_RESP_SUCCESS,
1429 err = chipset_ready_uevent(&inmsg.hdr);
1432 err = chipset_selftest_uevent(&inmsg.hdr);
1435 err = chipset_notready_uevent(&inmsg.hdr);
1439 if (inmsg.hdr.flags.response_expected)
1440 controlvm_respond(&inmsg.hdr,
1501 struct controlvm_message inmsg;
1509 &inmsg);
1518 inmsg = chipset_dev->controlvm_pending_msg;
1522 err = read_controlvm_event(&inmsg);
1526 err = handle_command(inmsg,
1530 chipset_dev->controlvm_pending_msg = inmsg;
1535 err = read_controlvm_event(&inmsg);