Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106105638
D8522.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D8522.diff
View Options
Index: head/sys/dev/hyperv/include/vmbus.h
===================================================================
--- head/sys/dev/hyperv/include/vmbus.h
+++ head/sys/dev/hyperv/include/vmbus.h
@@ -172,6 +172,7 @@
uint32_t vmbus_chan_id(const struct vmbus_channel *chan);
uint32_t vmbus_chan_subidx(const struct vmbus_channel *chan);
bool vmbus_chan_is_primary(const struct vmbus_channel *chan);
+bool vmbus_chan_is_revoked(const struct vmbus_channel *chan);
const struct hyperv_guid *
vmbus_chan_guid_inst(const struct vmbus_channel *chan);
int vmbus_chan_prplist_nelem(int br_size, int prpcnt_max,
Index: head/sys/dev/hyperv/vmbus/vmbus_chan.c
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus_chan.c
+++ head/sys/dev/hyperv/vmbus/vmbus_chan.c
@@ -1220,7 +1220,7 @@
wakeup(prichan);
done:
/*
- * Hook this channel up for later rescind.
+ * Hook this channel up for later revocation.
*/
mtx_lock(&sc->vmbus_chan_lock);
vmbus_chan_ins_list(sc, newchan);
@@ -1368,7 +1368,7 @@
note = (const struct vmbus_chanmsg_chrescind *)msg->msg_data;
if (note->chm_chanid > VMBUS_CHAN_MAX) {
- device_printf(sc->vmbus_dev, "invalid rescinded chan%u\n",
+ device_printf(sc->vmbus_dev, "invalid revoked chan%u\n",
note->chm_chanid);
return;
}
@@ -1403,8 +1403,12 @@
mtx_unlock(&sc->vmbus_prichan_lock);
}
+ if (atomic_testandset_int(&chan->ch_stflags,
+ VMBUS_CHAN_ST_REVOKED_SHIFT))
+ panic("channel has already been revoked");
+
if (bootverbose)
- vmbus_chan_printf(chan, "chan%u rescinded\n", note->chm_chanid);
+ vmbus_chan_printf(chan, "chan%u revoked\n", note->chm_chanid);
/* Detach the target channel. */
taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_detach_task);
@@ -1695,3 +1699,12 @@
return (chan->ch_mgmt_tq);
}
+
+bool
+vmbus_chan_is_revoked(const struct vmbus_channel *chan)
+{
+
+ if (chan->ch_stflags & VMBUS_CHAN_ST_REVOKED)
+ return (true);
+ return (false);
+}
Index: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h
+++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h
@@ -159,10 +159,12 @@
#define VMBUS_CHAN_ST_ONPRIL_SHIFT 1
#define VMBUS_CHAN_ST_ONSUBL_SHIFT 2
#define VMBUS_CHAN_ST_ONLIST_SHIFT 3
+#define VMBUS_CHAN_ST_REVOKED_SHIFT 4 /* sticky */
#define VMBUS_CHAN_ST_OPENED (1 << VMBUS_CHAN_ST_OPENED_SHIFT)
#define VMBUS_CHAN_ST_ONPRIL (1 << VMBUS_CHAN_ST_ONPRIL_SHIFT)
#define VMBUS_CHAN_ST_ONSUBL (1 << VMBUS_CHAN_ST_ONSUBL_SHIFT)
#define VMBUS_CHAN_ST_ONLIST (1 << VMBUS_CHAN_ST_ONLIST_SHIFT)
+#define VMBUS_CHAN_ST_REVOKED (1 << VMBUS_CHAN_ST_REVOKED_SHIFT)
struct vmbus_softc;
struct vmbus_message;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 12:04 PM (12 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15604529
Default Alt Text
D8522.diff (2 KB)
Attached To
Mode
D8522: hyperv/vmbus: Set a mark on the revoked channel.
Attached
Detach File
Event Timeline
Log In to Comment