Deleted Added
full compact
vmbus_var.h (307599) vmbus_var.h (309312)
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_var.h 307599 2016-10-19 02:24:17Z sephe $
26 * $FreeBSD: stable/11/sys/dev/hyperv/vmbus/vmbus_var.h 309312 2016-11-30 06:20:43Z dexuan $
27 */
28
29#ifndef _VMBUS_VAR_H_
30#define _VMBUS_VAR_H_
31
32#include <sys/param.h>
33#include <sys/taskqueue.h>
27 */
28
29#ifndef _VMBUS_VAR_H_
30#define _VMBUS_VAR_H_
31
32#include <sys/param.h>
33#include <sys/taskqueue.h>
34#include <sys/rman.h>
34
35#include <dev/hyperv/include/hyperv_busdma.h>
35
36#include <dev/hyperv/include/hyperv_busdma.h>
37#include <dev/pci/pcivar.h>
38#include <dev/pci/pcib_private.h>
36
37/*
38 * NOTE: DO NOT CHANGE THIS.
39 */
40#define VMBUS_SINT_MESSAGE 2
41/*
42 * NOTE:
43 * - DO NOT set it to the same value as VMBUS_SINT_MESSAGE.

--- 28 unchanged lines hidden (view full) ---

72 /* Rarely used fields */
73 struct hyperv_dma message_dma; /* busdma glue */
74 struct hyperv_dma event_flags_dma;/* busdma glue */
75 struct taskqueue *event_tq; /* event taskq */
76 struct taskqueue *message_tq; /* message taskq */
77 struct task message_task; /* message task */
78} __aligned(CACHE_LINE_SIZE);
79
39
40/*
41 * NOTE: DO NOT CHANGE THIS.
42 */
43#define VMBUS_SINT_MESSAGE 2
44/*
45 * NOTE:
46 * - DO NOT set it to the same value as VMBUS_SINT_MESSAGE.

--- 28 unchanged lines hidden (view full) ---

75 /* Rarely used fields */
76 struct hyperv_dma message_dma; /* busdma glue */
77 struct hyperv_dma event_flags_dma;/* busdma glue */
78 struct taskqueue *event_tq; /* event taskq */
79 struct taskqueue *message_tq; /* message taskq */
80 struct task message_task; /* message task */
81} __aligned(CACHE_LINE_SIZE);
82
83#if __FreeBSD_version < 1100000
84typedef u_long rman_res_t;
85#endif
86
80struct vmbus_softc {
81 void (*vmbus_event_proc)(struct vmbus_softc *, int);
82 u_long *vmbus_tx_evtflags;
83 /* event flags to host */
84 struct vmbus_mnf *vmbus_mnf2; /* monitored by host */
85
86 u_long *vmbus_rx_evtflags;
87 /* compat evtflgs from host */

--- 27 unchanged lines hidden (view full) ---

115
116 /* Primary channels */
117 struct mtx vmbus_prichan_lock;
118 TAILQ_HEAD(, vmbus_channel) vmbus_prichans;
119
120 /* Complete channel list */
121 struct mtx vmbus_chan_lock;
122 TAILQ_HEAD(, vmbus_channel) vmbus_chans;
87struct vmbus_softc {
88 void (*vmbus_event_proc)(struct vmbus_softc *, int);
89 u_long *vmbus_tx_evtflags;
90 /* event flags to host */
91 struct vmbus_mnf *vmbus_mnf2; /* monitored by host */
92
93 u_long *vmbus_rx_evtflags;
94 /* compat evtflgs from host */

--- 27 unchanged lines hidden (view full) ---

122
123 /* Primary channels */
124 struct mtx vmbus_prichan_lock;
125 TAILQ_HEAD(, vmbus_channel) vmbus_prichans;
126
127 /* Complete channel list */
128 struct mtx vmbus_chan_lock;
129 TAILQ_HEAD(, vmbus_channel) vmbus_chans;
130
131#ifdef NEW_PCIB
132 /* The list of usable MMIO ranges for PCIe pass-through */
133 struct pcib_host_resources vmbus_mmio_res;
134#endif
123};
124
125#define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */
126#define VMBUS_FLAG_SYNIC 0x0002 /* SynIC was setup */
127
128#define VMBUS_PCPU_GET(sc, field, cpu) (sc)->vmbus_pcpu[(cpu)].field
129#define VMBUS_PCPU_PTR(sc, field, cpu) &(sc)->vmbus_pcpu[(cpu)].field
130

--- 25 unchanged lines hidden ---
135};
136
137#define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */
138#define VMBUS_FLAG_SYNIC 0x0002 /* SynIC was setup */
139
140#define VMBUS_PCPU_GET(sc, field, cpu) (sc)->vmbus_pcpu[(cpu)].field
141#define VMBUS_PCPU_PTR(sc, field, cpu) &(sc)->vmbus_pcpu[(cpu)].field
142

--- 25 unchanged lines hidden ---