vmbus_chanvar.h (307461) | vmbus_chanvar.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_chanvar.h 307461 2016-10-17 03:24:03Z sephe $ | 26 * $FreeBSD: stable/11/sys/dev/hyperv/vmbus/vmbus_chanvar.h 307462 2016-10-17 03:27:23Z sephe $ |
27 */ 28 29#ifndef _VMBUS_CHANVAR_H_ 30#define _VMBUS_CHANVAR_H_ 31 32#include <sys/param.h> 33#include <sys/lock.h> 34#include <sys/mutex.h> 35#include <sys/queue.h> 36#include <sys/taskqueue.h> 37#include <sys/sysctl.h> 38 39#include <dev/hyperv/include/hyperv.h> 40#include <dev/hyperv/include/hyperv_busdma.h> 41#include <dev/hyperv/include/vmbus.h> 42 43typedef struct { | 27 */ 28 29#ifndef _VMBUS_CHANVAR_H_ 30#define _VMBUS_CHANVAR_H_ 31 32#include <sys/param.h> 33#include <sys/lock.h> 34#include <sys/mutex.h> 35#include <sys/queue.h> 36#include <sys/taskqueue.h> 37#include <sys/sysctl.h> 38 39#include <dev/hyperv/include/hyperv.h> 40#include <dev/hyperv/include/hyperv_busdma.h> 41#include <dev/hyperv/include/vmbus.h> 42 43typedef struct { |
44 /* 45 * offset in bytes from the start of ring data below 46 */ 47 volatile uint32_t write_index; 48 /* 49 * offset in bytes from the start of ring data below 50 */ 51 volatile uint32_t read_index; 52 /* 53 * NOTE: The interrupt_mask field is used only for channels, but 54 * vmbus connection also uses this data structure 55 */ 56 volatile uint32_t interrupt_mask; 57 /* pad it to PAGE_SIZE so that data starts on a page */ 58 uint8_t reserved[4084]; 59 60 /* 61 * WARNING: Ring data starts here 62 * !!! DO NOT place any fields below this !!! 63 */ 64 uint8_t buffer[0]; /* doubles as interrupt mask */ 65} __packed hv_vmbus_ring_buffer; 66 67typedef struct { 68 hv_vmbus_ring_buffer* ring_buffer; | 44 struct vmbus_bufring *ring_buffer; |
69 struct mtx ring_lock; 70 uint32_t ring_data_size; /* ring_size */ 71} hv_vmbus_ring_buffer_info; 72 73struct vmbus_channel { 74 /* 75 * NOTE: 76 * Fields before ch_txbr are only accessed on this channel's --- 116 unchanged lines hidden --- | 45 struct mtx ring_lock; 46 uint32_t ring_data_size; /* ring_size */ 47} hv_vmbus_ring_buffer_info; 48 49struct vmbus_channel { 50 /* 51 * NOTE: 52 * Fields before ch_txbr are only accessed on this channel's --- 116 unchanged lines hidden --- |