vmbus_reg.h revision 301019
1301019Ssephe/*- 2301019Ssephe * Copyright (c) 2016 Microsoft Corp. 3301019Ssephe * All rights reserved. 4301019Ssephe * 5301019Ssephe * Redistribution and use in source and binary forms, with or without 6301019Ssephe * modification, are permitted provided that the following conditions 7301019Ssephe * are met: 8301019Ssephe * 1. Redistributions of source code must retain the above copyright 9301019Ssephe * notice unmodified, this list of conditions, and the following 10301019Ssephe * disclaimer. 11301019Ssephe * 2. Redistributions in binary form must reproduce the above copyright 12301019Ssephe * notice, this list of conditions and the following disclaimer in the 13301019Ssephe * documentation and/or other materials provided with the distribution. 14301019Ssephe * 15301019Ssephe * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16301019Ssephe * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17301019Ssephe * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18301019Ssephe * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19301019Ssephe * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20301019Ssephe * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21301019Ssephe * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22301019Ssephe * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23301019Ssephe * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24301019Ssephe * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25301019Ssephe * 26301019Ssephe * $FreeBSD: head/sys/dev/hyperv/vmbus/vmbus_reg.h 301019 2016-05-31 05:18:55Z sephe $ 27301019Ssephe */ 28301019Ssephe 29301019Ssephe#ifndef _VMBUS_REG_H_ 30301019Ssephe#define _VMBUS_REG_H_ 31301019Ssephe 32301019Ssephe#include <sys/param.h> 33301019Ssephe 34301019Ssephe/* 35301019Ssephe * Hyper-V SynIC message format. 36301019Ssephe */ 37301019Ssephe 38301019Ssephe#define VMBUS_MSG_DSIZE_MAX 240 39301019Ssephe#define VMBUS_MSG_SIZE 256 40301019Ssephe 41301019Ssephestruct vmbus_message { 42301019Ssephe uint32_t msg_type; /* VMBUS_MSGTYPE_ */ 43301019Ssephe uint8_t msg_dsize; /* data size */ 44301019Ssephe uint8_t msg_flags; /* VMBUS_MSGFLAG_ */ 45301019Ssephe uint16_t msg_rsvd; 46301019Ssephe uint64_t msg_id; 47301019Ssephe uint8_t msg_data[VMBUS_MSG_DSIZE_MAX]; 48301019Ssephe} __packed; 49301019SsepheCTASSERT(sizeof(struct vmbus_message) == VMBUS_MSG_SIZE); 50301019Ssephe 51301019Ssephe#define VMBUS_MSGTYPE_NONE 0 52301019Ssephe#define VMBUS_MSGTYPE_TIMER_EXPIRED 0x80000010 53301019Ssephe 54301019Ssephe#define VMBUS_MSGFLAG_PENDING 0x01 55301019Ssephe 56301019Ssephe#endif /* !_VMBUS_REG_H_ */ 57