Merge tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyper...
[sfrench/cifs-2.6.git] / drivers / hv / hyperv_vmbus.h
index 50eaa1fd6e4599b43bf07dfa3408eff0b9f4562b..af9379a3bf8990fa5ee68f5f0fbddd9391eab3c2 100644 (file)
@@ -169,8 +169,10 @@ extern int hv_synic_alloc(void);
 
 extern void hv_synic_free(void);
 
+extern void hv_synic_enable_regs(unsigned int cpu);
 extern int hv_synic_init(unsigned int cpu);
 
+extern void hv_synic_disable_regs(unsigned int cpu);
 extern int hv_synic_cleanup(unsigned int cpu);
 
 /* Interface */
@@ -256,6 +258,32 @@ struct vmbus_connection {
        struct workqueue_struct *work_queue;
        struct workqueue_struct *handle_primary_chan_wq;
        struct workqueue_struct *handle_sub_chan_wq;
+
+       /*
+        * The number of sub-channels and hv_sock channels that should be
+        * cleaned up upon suspend: sub-channels will be re-created upon
+        * resume, and hv_sock channels should not survive suspend.
+        */
+       atomic_t nr_chan_close_on_suspend;
+       /*
+        * vmbus_bus_suspend() waits for "nr_chan_close_on_suspend" to
+        * drop to zero.
+        */
+       struct completion ready_for_suspend_event;
+
+       /*
+        * The number of primary channels that should be "fixed up"
+        * upon resume: these channels are re-offered upon resume, and some
+        * fields of the channel offers (i.e. child_relid and connection_id)
+        * can change, so the old offermsg must be fixed up, before the resume
+        * callbacks of the VSC drivers start to further touch the channels.
+        */
+       atomic_t nr_chan_fixup_on_resume;
+       /*
+        * vmbus_bus_resume() waits for "nr_chan_fixup_on_resume" to
+        * drop to zero.
+        */
+       struct completion ready_for_resume_event;
 };
 
 
@@ -270,6 +298,8 @@ struct vmbus_msginfo {
 
 extern struct vmbus_connection vmbus_connection;
 
+int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, u32 version);
+
 static inline void vmbus_send_interrupt(u32 relid)
 {
        sync_set_bit(relid, vmbus_connection.send_int_page);