summaryrefslogtreecommitdiff
path: root/sys/dev/pv/hyperv.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-06-27 13:56:16 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-06-27 13:56:16 +0000
commit4affc7a47f5053bfebbf36264d52aa337452013f (patch)
treecfcdba61e9e070cb6620822d42e658c536789efc /sys/dev/pv/hyperv.c
parented104163a03879290ff22780215a536dee011585 (diff)
Provide a handler stub for the "channel rescind" message
Diffstat (limited to 'sys/dev/pv/hyperv.c')
-rw-r--r--sys/dev/pv/hyperv.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c
index 8754c0a43de..a75276335d6 100644
--- a/sys/dev/pv/hyperv.c
+++ b/sys/dev/pv/hyperv.c
@@ -97,6 +97,7 @@ void hv_message_intr(struct hv_softc *);
int hv_vmbus_connect(struct hv_softc *);
void hv_channel_response(struct hv_softc *, struct vmbus_chanmsg_hdr *);
void hv_channel_offer(struct hv_softc *, struct vmbus_chanmsg_hdr *);
+void hv_channel_rescind(struct hv_softc *, struct vmbus_chanmsg_hdr *);
void hv_channel_delivered(struct hv_softc *, struct vmbus_chanmsg_hdr *);
int hv_channel_scan(struct hv_softc *);
void hv_process_offer(struct hv_softc *, struct hv_offer *);
@@ -118,7 +119,7 @@ struct {
} hv_msg_dispatch[] = {
{ 0, 0, NULL },
{ VMBUS_CHANMSG_CHOFFER, 0, hv_channel_offer },
- { VMBUS_CHANMSG_CHRESCIND, 0, NULL },
+ { VMBUS_CHANMSG_CHRESCIND, 0, hv_channel_rescind },
{ VMBUS_CHANMSG_CHREQUEST, VMBUS_CHANMSG_CHOFFER,
NULL },
{ VMBUS_CHANMSG_CHOFFER_DONE, 0,
@@ -784,6 +785,16 @@ hv_channel_offer(struct hv_softc *sc, struct vmbus_chanmsg_hdr *hdr)
}
void
+hv_channel_rescind(struct hv_softc *sc, struct vmbus_chanmsg_hdr *hdr)
+{
+ const struct vmbus_chanmsg_chrescind *cmd;
+
+ cmd = (const struct vmbus_chanmsg_chrescind *)hdr;
+ printf("%s: revoking channel %u\n", sc->sc_dev.dv_xname,
+ cmd->chm_chanid);
+}
+
+void
hv_channel_delivered(struct hv_softc *sc, struct vmbus_chanmsg_hdr *hdr)
{
atomic_setbits_int(&sc->sc_flags, HSF_OFFERS_DELIVERED);