vmbus_reg.h (307459) | vmbus_reg.h (307462) |
---|---|
1/*- 2 * Copyright (c) 2016 Microsoft Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2016 Microsoft Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * |
26 * $FreeBSD: stable/11/sys/dev/hyperv/vmbus/vmbus_reg.h 307459 2016-10-17 02:44:27Z sephe $ | 26 * $FreeBSD: stable/11/sys/dev/hyperv/vmbus/vmbus_reg.h 307462 2016-10-17 03:27:23Z sephe $ |
27 */ 28 29#ifndef _VMBUS_REG_H_ 30#define _VMBUS_REG_H_ 31 32#include <sys/param.h> 33#include <dev/hyperv/include/hyperv.h> /* XXX for hyperv_guid */ 34#include <dev/hyperv/include/vmbus.h> --- 62 unchanged lines hidden (view full) --- 97 98 struct hyperv_mon_param 99 mnf_param[VMBUS_MONTRIGS_MAX][VMBUS_MONTRIG_LEN]; 100 uint8_t mnf_rsvd4[1984]; 101} __packed; 102CTASSERT(sizeof(struct vmbus_mnf) == PAGE_SIZE); 103 104/* | 27 */ 28 29#ifndef _VMBUS_REG_H_ 30#define _VMBUS_REG_H_ 31 32#include <sys/param.h> 33#include <dev/hyperv/include/hyperv.h> /* XXX for hyperv_guid */ 34#include <dev/hyperv/include/vmbus.h> --- 62 unchanged lines hidden (view full) --- 97 98 struct hyperv_mon_param 99 mnf_param[VMBUS_MONTRIGS_MAX][VMBUS_MONTRIG_LEN]; 100 uint8_t mnf_rsvd4[1984]; 101} __packed; 102CTASSERT(sizeof(struct vmbus_mnf) == PAGE_SIZE); 103 104/* |
105 * Buffer ring 106 */ 107struct vmbus_bufring { 108 /* 109 * If br_windex == br_rindex, this bufring is empty; this 110 * means we can _not_ write data to the bufring, if the 111 * write is going to make br_windex same as br_rindex. 112 */ 113 volatile uint32_t br_windex; 114 volatile uint32_t br_rindex; 115 116 /* 117 * Interrupt mask {0,1} 118 * 119 * For TX bufring, host set this to 1, when it is processing 120 * the TX bufring, so that we can safely skip the TX event 121 * notification to host. 122 * 123 * For RX bufring, once this is set to 1 by us, host will not 124 * further dispatch interrupts to us, even if there are data 125 * pending on the RX bufring. This effectively disables the 126 * interrupt of the channel to which this RX bufring is attached. 127 */ 128 volatile uint32_t br_imask; 129 130 uint8_t br_rsvd[4084]; 131 uint8_t br_data[]; 132} __packed; 133CTASSERT(sizeof(struct vmbus_bufring) == PAGE_SIZE); 134 135/* |
|
105 * Channel 106 */ 107 108#define VMBUS_CHAN_MAX_COMPAT 256 109#define VMBUS_CHAN_MAX (VMBUS_EVTFLAG_LEN * VMBUS_EVTFLAGS_MAX) 110 111/* 112 * Channel packets --- 190 unchanged lines hidden --- | 136 * Channel 137 */ 138 139#define VMBUS_CHAN_MAX_COMPAT 256 140#define VMBUS_CHAN_MAX (VMBUS_EVTFLAG_LEN * VMBUS_EVTFLAGS_MAX) 141 142/* 143 * Channel packets --- 190 unchanged lines hidden --- |