Lines Matching refs:inmsg

310 static int chipset_init(struct controlvm_message *inmsg)  in chipset_init()  argument
328 features = inmsg->cmd.init_chipset.features & in chipset_init()
333 if (inmsg->hdr.flags.response_expected) in chipset_init()
334 res = controlvm_respond_chipset_init(&inmsg->hdr, rc, features); in chipset_init()
447 static int visorbus_create(struct controlvm_message *inmsg) in visorbus_create() argument
449 struct controlvm_message_packet *cmd = &inmsg->cmd; in visorbus_create()
472 err = save_crash_message(inmsg, CRASH_BUS); in visorbus_create()
476 if (inmsg->hdr.flags.response_expected == 1) { in visorbus_create()
482 memcpy(pmsg_hdr, &inmsg->hdr, in visorbus_create()
511 if (inmsg->hdr.flags.response_expected == 1) in visorbus_create()
512 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err); in visorbus_create()
516 static int visorbus_destroy(struct controlvm_message *inmsg) in visorbus_destroy() argument
519 u32 bus_no = inmsg->cmd.destroy_bus.bus_no; in visorbus_destroy()
537 if (inmsg->hdr.flags.response_expected == 1) { in visorbus_destroy()
543 memcpy(pmsg_hdr, &inmsg->hdr, in visorbus_destroy()
552 if (inmsg->hdr.flags.response_expected == 1) in visorbus_destroy()
553 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err); in visorbus_destroy()
592 static int visorbus_configure(struct controlvm_message *inmsg, in visorbus_configure() argument
595 struct controlvm_message_packet *cmd = &inmsg->cmd; in visorbus_configure()
624 if (inmsg->hdr.flags.response_expected == 1) in visorbus_configure()
625 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err); in visorbus_configure()
631 if (inmsg->hdr.flags.response_expected == 1) in visorbus_configure()
632 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err); in visorbus_configure()
636 static int visorbus_device_create(struct controlvm_message *inmsg) in visorbus_device_create() argument
638 struct controlvm_message_packet *cmd = &inmsg->cmd; in visorbus_device_create()
693 err = save_crash_message(inmsg, CRASH_DEV); in visorbus_device_create()
697 if (inmsg->hdr.flags.response_expected == 1) { in visorbus_device_create()
703 memcpy(pmsg_hdr, &inmsg->hdr, in visorbus_device_create()
721 if (inmsg->hdr.flags.response_expected == 1) in visorbus_device_create()
722 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err); in visorbus_device_create()
726 static int visorbus_device_changestate(struct controlvm_message *inmsg) in visorbus_device_changestate() argument
728 struct controlvm_message_packet *cmd = &inmsg->cmd; in visorbus_device_changestate()
751 if (inmsg->hdr.flags.response_expected == 1) { in visorbus_device_changestate()
757 memcpy(pmsg_hdr, &inmsg->hdr, in visorbus_device_changestate()
779 if (inmsg->hdr.flags.response_expected == 1) in visorbus_device_changestate()
780 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err); in visorbus_device_changestate()
784 static int visorbus_device_destroy(struct controlvm_message *inmsg) in visorbus_device_destroy() argument
786 struct controlvm_message_packet *cmd = &inmsg->cmd; in visorbus_device_destroy()
807 if (inmsg->hdr.flags.response_expected == 1) { in visorbus_device_destroy()
814 memcpy(pmsg_hdr, &inmsg->hdr, in visorbus_device_destroy()
823 if (inmsg->hdr.flags.response_expected == 1) in visorbus_device_destroy()
824 controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err); in visorbus_device_destroy()
1065 static int parahotplug_process_message(struct controlvm_message *inmsg) in parahotplug_process_message() argument
1070 req = parahotplug_request_create(inmsg); in parahotplug_process_message()
1077 if (inmsg->cmd.device_change_state.state.active) { in parahotplug_process_message()
1081 controlvm_respond(&inmsg->hdr, CONTROLVM_RESP_SUCCESS, in parahotplug_process_message()
1082 &inmsg->cmd.device_change_state.state); in parahotplug_process_message()
1100 controlvm_respond(&inmsg->hdr, err, in parahotplug_process_message()
1101 &inmsg->cmd.device_change_state.state); in parahotplug_process_message()
1359 static int handle_command(struct controlvm_message inmsg, u64 channel_addr) in handle_command() argument
1361 struct controlvm_message_packet *cmd = &inmsg.cmd; in handle_command()
1369 parm_addr = channel_addr + inmsg.hdr.payload_vm_offset; in handle_command()
1370 parm_bytes = inmsg.hdr.payload_bytes; in handle_command()
1383 controlvm_init_response(&ackmsg, &inmsg.hdr, CONTROLVM_RESP_SUCCESS); in handle_command()
1388 switch (inmsg.hdr.id) { in handle_command()
1390 err = chipset_init(&inmsg); in handle_command()
1393 err = visorbus_create(&inmsg); in handle_command()
1396 err = visorbus_destroy(&inmsg); in handle_command()
1399 err = visorbus_configure(&inmsg, parser_ctx); in handle_command()
1402 err = visorbus_device_create(&inmsg); in handle_command()
1406 err = parahotplug_process_message(&inmsg); in handle_command()
1412 err = visorbus_device_changestate(&inmsg); in handle_command()
1417 err = visorbus_device_destroy(&inmsg); in handle_command()
1421 if (inmsg.hdr.flags.response_expected) in handle_command()
1422 controlvm_respond(&inmsg.hdr, CONTROLVM_RESP_SUCCESS, in handle_command()
1426 err = chipset_ready_uevent(&inmsg.hdr); in handle_command()
1429 err = chipset_selftest_uevent(&inmsg.hdr); in handle_command()
1432 err = chipset_notready_uevent(&inmsg.hdr); in handle_command()
1436 if (inmsg.hdr.flags.response_expected) in handle_command()
1437 controlvm_respond(&inmsg.hdr, in handle_command()
1498 struct controlvm_message inmsg; in controlvm_periodic_work() local
1506 &inmsg); in controlvm_periodic_work()
1515 inmsg = chipset_dev->controlvm_pending_msg; in controlvm_periodic_work()
1519 err = read_controlvm_event(&inmsg); in controlvm_periodic_work()
1523 err = handle_command(inmsg, in controlvm_periodic_work()
1527 chipset_dev->controlvm_pending_msg = inmsg; in controlvm_periodic_work()
1532 err = read_controlvm_event(&inmsg); in controlvm_periodic_work()