Lines Matching refs:msg
430 struct hvctl_msg msg; in guest_start() local
457 bzero(&msg, sizeof(msg)); in guest_start()
458 msg.hdr.op = HVCTL_OP_GUEST_START; in guest_start()
459 msg.hdr.seq = hvctl_seq++; in guest_start()
460 msg.msg.guestop.guestid = gid; in guest_start()
461 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_start()
462 if (nbytes != sizeof(msg)) in guest_start()
465 bzero(&msg, sizeof(msg)); in guest_start()
466 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_start()
467 if (nbytes != sizeof(msg)) in guest_start()
477 struct hvctl_msg msg; in guest_stop() local
488 bzero(&msg, sizeof(msg)); in guest_stop()
489 msg.hdr.op = HVCTL_OP_GUEST_STOP; in guest_stop()
490 msg.hdr.seq = hvctl_seq++; in guest_stop()
491 msg.msg.guestop.guestid = find_guest(argv[1]); in guest_stop()
492 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_stop()
493 if (nbytes != sizeof(msg)) in guest_stop()
496 bzero(&msg, sizeof(msg)); in guest_stop()
497 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_stop()
498 if (nbytes != sizeof(msg)) in guest_stop()
505 struct hvctl_msg msg; in guest_panic() local
532 bzero(&msg, sizeof(msg)); in guest_panic()
533 msg.hdr.op = HVCTL_OP_GUEST_PANIC; in guest_panic()
534 msg.hdr.seq = hvctl_seq++; in guest_panic()
535 msg.msg.guestop.guestid = gid; in guest_panic()
536 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_panic()
537 if (nbytes != sizeof(msg)) in guest_panic()
540 bzero(&msg, sizeof(msg)); in guest_panic()
541 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_panic()
542 if (nbytes != sizeof(msg)) in guest_panic()
552 struct hvctl_msg msg; in guest_status() local
580 bzero(&msg, sizeof(msg)); in guest_status()
581 msg.hdr.op = HVCTL_OP_GET_RES_STAT; in guest_status()
582 msg.hdr.seq = hvctl_seq++; in guest_status()
583 msg.msg.resstat.res = HVCTL_RES_GUEST; in guest_status()
584 msg.msg.resstat.resid = guest->gid; in guest_status()
585 msg.msg.resstat.infoid = HVCTL_INFO_GUEST_STATE; in guest_status()
586 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_status()
587 if (nbytes != sizeof(msg)) in guest_status()
590 bzero(&msg, sizeof(msg)); in guest_status()
591 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_status()
592 if (nbytes != sizeof(msg)) in guest_status()
597 memcpy(&state, msg.msg.resstat.data, sizeof(state)); in guest_status()
608 bzero(&msg, sizeof(msg)); in guest_status()
609 msg.hdr.op = HVCTL_OP_GET_RES_STAT; in guest_status()
610 msg.hdr.seq = hvctl_seq++; in guest_status()
611 msg.msg.resstat.res = HVCTL_RES_GUEST; in guest_status()
612 msg.msg.resstat.resid = guest->gid; in guest_status()
613 msg.msg.resstat.infoid = HVCTL_INFO_GUEST_SOFT_STATE; in guest_status()
614 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_status()
615 if (nbytes != sizeof(msg)) in guest_status()
618 bzero(&msg, sizeof(msg)); in guest_status()
619 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_status()
620 if (nbytes != sizeof(msg)) in guest_status()
623 memcpy(&softstate, msg.msg.resstat.data, in guest_status()
626 bzero(&msg, sizeof(msg)); in guest_status()
627 msg.hdr.op = HVCTL_OP_GET_RES_STAT; in guest_status()
628 msg.hdr.seq = hvctl_seq++; in guest_status()
629 msg.msg.resstat.res = HVCTL_RES_GUEST; in guest_status()
630 msg.msg.resstat.resid = guest->gid; in guest_status()
631 msg.msg.resstat.infoid = HVCTL_INFO_GUEST_UTILISATION; in guest_status()
632 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_status()
633 if (nbytes != sizeof(msg)) in guest_status()
636 bzero(&msg, sizeof(msg)); in guest_status()
637 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_status()
638 if (nbytes != sizeof(msg)) in guest_status()
641 memcpy(&util, msg.msg.resstat.data, sizeof(util)); in guest_status()
697 struct hvctl_msg msg; in hv_open() local
708 bzero(&msg, sizeof(msg)); in hv_open()
709 msg.hdr.op = HVCTL_OP_HELLO; in hv_open()
710 msg.hdr.seq = hvctl_seq++; in hv_open()
711 msg.msg.hello.major = 1; in hv_open()
712 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in hv_open()
713 if (nbytes != sizeof(msg)) in hv_open()
716 bzero(&msg, sizeof(msg)); in hv_open()
717 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in hv_open()
718 if (nbytes != sizeof(msg)) in hv_open()
721 code = msg.msg.clnge.code ^ 0xbadbeef20; in hv_open()
726 bzero(&msg, sizeof(msg)); in hv_open()
727 msg.hdr.op = HVCTL_OP_RESPONSE; in hv_open()
728 msg.hdr.seq = hvctl_seq++; in hv_open()
729 msg.msg.clnge.code = code ^ 0x12cafe42a; in hv_open()
730 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in hv_open()
731 if (nbytes != sizeof(msg)) in hv_open()
734 bzero(&msg, sizeof(msg)); in hv_open()
735 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in hv_open()
736 if (nbytes != sizeof(msg)) in hv_open()
750 struct hvctl_msg msg; in hv_config() local
761 bzero(&msg, sizeof(msg)); in hv_config()
762 msg.hdr.op = HVCTL_OP_GET_HVCONFIG; in hv_config()
763 msg.hdr.seq = hvctl_seq++; in hv_config()
764 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in hv_config()
765 if (nbytes != sizeof(msg)) in hv_config()
768 bzero(&msg, sizeof(msg)); in hv_config()
769 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in hv_config()
770 if (nbytes != sizeof(msg)) in hv_config()
773 hv_membase = msg.msg.hvcnf.hv_membase; in hv_config()
774 hv_memsize = msg.msg.hvcnf.hv_memsize; in hv_config()
776 hv_mdpa = msg.msg.hvcnf.hvmdp; in hv_config()