#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/cpu.h>
#include <linux/hyperv.h>
#include <asm/mshyperv.h>
#include <linux/sched/isolation.h>
#include "hyperv_vmbus.h"
static void init_vp_index(struct vmbus_channel *channel);
const struct vmbus_device vmbus_devs[] = …;
EXPORT_SYMBOL_GPL(…);
static const struct { … } vmbus_unsupported_devs[] = …;
static void vmbus_rescind_cleanup(struct vmbus_channel *channel)
{ … }
static bool is_unsupported_vmbus_devs(const guid_t *guid)
{ … }
static u16 hv_get_dev_type(const struct vmbus_channel *channel)
{ … }
bool vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, u8 *buf,
u32 buflen, const int *fw_version, int fw_vercnt,
const int *srv_version, int srv_vercnt,
int *nego_fw_version, int *nego_srv_version)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct vmbus_channel *alloc_channel(void)
{ … }
static void free_channel(struct vmbus_channel *channel)
{ … }
void vmbus_channel_map_relid(struct vmbus_channel *channel)
{ … }
void vmbus_channel_unmap_relid(struct vmbus_channel *channel)
{ … }
static void vmbus_release_relid(u32 relid)
{ … }
void hv_process_channel_removal(struct vmbus_channel *channel)
{ … }
void vmbus_free_channels(void)
{ … }
static void vmbus_add_channel_work(struct work_struct *work)
{ … }
static void vmbus_process_offer(struct vmbus_channel *newchannel)
{ … }
static bool hv_cpuself_used(u32 cpu, struct vmbus_channel *chn)
{ … }
static int next_numa_node_id;
static void init_vp_index(struct vmbus_channel *channel)
{ … }
#define UNLOAD_DELAY_UNIT_MS …
#define UNLOAD_WAIT_MS …
#define UNLOAD_WAIT_LOOPS …
#define UNLOAD_MSG_MS …
#define UNLOAD_MSG_LOOPS …
static void vmbus_wait_for_unload(void)
{ … }
static void vmbus_unload_response(struct vmbus_channel_message_header *hdr)
{ … }
void vmbus_initiate_unload(bool crash)
{ … }
static void check_ready_for_resume_event(void)
{ … }
static void vmbus_setup_channel_state(struct vmbus_channel *channel,
struct vmbus_channel_offer_channel *offer)
{ … }
static struct vmbus_channel *
find_primary_channel_by_offer(const struct vmbus_channel_offer_channel *offer)
{ … }
static bool vmbus_is_valid_offer(const struct vmbus_channel_offer_channel *offer)
{ … }
static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
{ … }
static void check_ready_for_suspend_event(void)
{ … }
static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
{ … }
void vmbus_hvsock_device_unregister(struct vmbus_channel *channel)
{ … }
EXPORT_SYMBOL_GPL(…);
static void vmbus_onoffers_delivered(
struct vmbus_channel_message_header *hdr)
{ … }
static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr)
{ … }
static void vmbus_ongpadl_created(struct vmbus_channel_message_header *hdr)
{ … }
static void vmbus_onmodifychannel_response(struct vmbus_channel_message_header *hdr)
{ … }
static void vmbus_ongpadl_torndown(
struct vmbus_channel_message_header *hdr)
{ … }
static void vmbus_onversion_response(
struct vmbus_channel_message_header *hdr)
{ … }
const struct vmbus_channel_message_table_entry
channel_message_table[CHANNELMSG_COUNT] = …;
void vmbus_onmessage(struct vmbus_channel_message_header *hdr)
{ … }
int vmbus_request_offers(void)
{ … }
void vmbus_set_sc_create_callback(struct vmbus_channel *primary_channel,
void (*sc_cr_cb)(struct vmbus_channel *new_sc))
{ … }
EXPORT_SYMBOL_GPL(…);
void vmbus_set_chn_rescind_callback(struct vmbus_channel *channel,
void (*chn_rescind_cb)(struct vmbus_channel *))
{ … }
EXPORT_SYMBOL_GPL(…);