21 #define VMBUS_MESSAGE_ID 1 24 #define VMBUS_EVENT_ID 2 27 #define VMBUS_MESSAGE_TYPE 1 30 #define VMBUS_MESSAGE_SINT 2 334 #define VMBUS_PACKET_MAX_HEADER_LEN 64 408 const void *
data,
size_t len );
436 const void *
data,
size_t len );
546 #define VMBUS_DRIVERS __table ( struct vmbus_driver, "vmbus_drivers" ) 549 #define __vmbus_driver __table_entry ( VMBUS_DRIVERS, 01 ) 572 #define VMBUS_TYPE( a, b, c, d, e0, e1, e2, e3, e4, e5 ) { \ 574 cpu_to_le32 ( a ), cpu_to_le16 ( b ), \ 575 cpu_to_le16 ( c ), cpu_to_be16 ( d ), \ 576 { e0, e1, e2, e3, e4, e5 } \ 640 unsigned int gpadl );
646 const void *
data,
size_t len );
651 const void *
data,
size_t len );
uint32_t channel
Channel ID.
struct vmbus_message_header header
Message header.
uint32_t channel
Channel ID.
struct vmbus_ring * out
Outbound ring buffer.
uint8_t out[PAGE_SIZE/2]
Outbound interrupts.
struct device dev
Generic iPXE device.
static int vmbus_has_data(struct vmbus_device *vmdev)
Check if data is present in ring buffer.
struct vmbus_offer_channel offer
"Offer channel" message
uint8_t reserved_b[2]
Reserved.
void vmbus_close(struct vmbus_device *vmdev)
Close VMBus channel.
int vmbus_poll(struct vmbus_device *vmdev)
Poll ring buffer.
int(* recv_control)(struct vmbus_device *vmdev, uint64_t xid, const void *data, size_t len)
Handle received control packet.
struct vmbus_message_header header
Message header.
#define list_add(new, head)
Add a new entry to the head of a list.
int(* recv_data)(struct vmbus_device *vmdev, uint64_t xid, const void *data, size_t len, struct list_head *list)
Handle received data packet.
uint32_t offset
Starting byte offset.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct list_head list
List of all transfer page sets.
uint8_t monitor
Monitor ID.
struct vmbus_channel_operations * op
Channel operations.
int(* recv_completion)(struct vmbus_device *vmdev, uint64_t xid, const void *data, size_t len)
Handle received completion packet.
uint32_t channel
Channel ID.
uint32_t connection
Connection ID.
int vmbus_send_data(struct vmbus_device *vmdev, uint64_t xid, const void *data, size_t len, struct io_buffer *iobuf)
Send data packet via ring buffer.
uint8_t in[PAGE_SIZE/2]
Inbound interrupts.
#define VMBUS_PACKET_MAX_HEADER_LEN
Maximum expected size of VMBus packet header.
vmbus_message_type
VMBus message types.
unsigned long long uint64_t
struct vmbus_message_header header
Message header.
void * priv
Driver-private data.
uint32_t out_len
Outbound ring buffer length.
uint8_t reserved[4084]
Reserved.
struct vmbus_xfer_pages_operations * op
Page set operations.
#define PAGE_SIZE
Page size.
uint8_t data[120]
User-specific data.
uint8_t reserved[3]
Reserved.
uint32_t status
Creation status.
Access to external ("user") memory.
VMBus "open channel" message.
VMBus "GPADL created" message.
vmbus_packet_type
VMBus packet types.
struct vmbus_gpadl_torndown torndown
"GPADL torndown" message
int vmbus_send_control(struct vmbus_device *vmdev, uint64_t xid, const void *data, size_t len)
Send control packet via ring buffer.
A doubly-linked list entry (or list head)
static int vmbus_register_pages(struct vmbus_device *vmdev, struct vmbus_xfer_pages *pages)
Register transfer page set.
VMBus "version response" message.
const union vmbus_message * message
Received message buffer.
Guest physical address range descriptor.
#define list_del(list)
Delete an entry from a list.
uint32_t channel
Channel ID.
uint32_t prod
Producer index (modulo ring length)
uint32_t userptr_t
A pointer to a user buffer.
uint16_t pageset
Page set ID (in protocol byte order)
static int vmbus_gpadl_is_obsolete(unsigned int gpadl)
Check if GPADL is obsolete.
uint32_t cons
Consumer index (modulo ring length)
int vmbus_gpadl_teardown(struct vmbus_device *vmdev, unsigned int gpadl)
Tear down GPA descriptor list.
uint32_t intr_mask
Interrupt mask.
struct vmbus_message_header header
Message header.
uint32_t in_len
Inbound ring buffer length.
uint32_t reserved
Reserved.
void * packet
Packet buffer.
int vmbus_probe(struct hv_hypervisor *hv, struct device *parent)
Probe Hyper-V virtual machine bus.
int vmbus_send_cancellation(struct vmbus_device *vmdev, uint64_t xid)
Send cancellation packet via ring buffer.
struct vmbus_close_channel close
"Close channel" message
union uuid type
Channel type.
unsigned int vmbus_obsolete_gpadl
Obsolete GPADL ID threshold.
VMBus "GPADL torndown" message.
struct vmbus_gpadl_created created
"GPADL created" message
uint8_t data[0]
Ring buffer contents.
uint16_t minor
Minor version.
static void * vmbus_get_drvdata(struct vmbus_device *vmdev)
Get VMBus device driver-private data.
union uuid type
Device type.
struct vmbus_driver * driver
Driver.
uint32_t channel
Channel ID.
struct vmbus_gpadl_header gpadlhdr
"GPADL header" message
struct hv_monitor * monitor_in
Inbound notifications.
static void vmbus_unregister_pages(struct vmbus_device *vmdev, struct vmbus_xfer_pages *pages)
Unregister transfer page set.
struct vmbus_ring * in
Inbound ring buffer.
uint8_t supported
Version is supported.
int vmbus_establish_gpadl(struct vmbus_device *vmdev, userptr_t data, size_t len)
Establish GPA descriptor list.
int(* copy)(struct vmbus_xfer_pages *pages, void *data, size_t offset, size_t len)
Copy data from transfer page.
vmbus_raw_version
Known VMBus protocol versions.
uint8_t monitored
Monitor exists.
void vmbus_dump_channel(struct vmbus_device *vmdev)
Dump channel status (for debugging)
vmbus_packet_flags
VMBus packet flags.
struct vmbus_version_response version
"Version response" message
VMBus transfer page set operations.
struct vmbus_open_channel open
"Open channel" message
static uint16_t struct vmbus_xfer_pages_operations * op
VMBus "open channel result" message.
unsigned int channel
Channel ID.
union vmbus_version version
Version.
unsigned int monitor
Monitor ID.
VMBus "close channel" message.
int vmbus_open(struct vmbus_device *vmdev, struct vmbus_channel_operations *op, size_t out_len, size_t in_len, size_t mtu)
Open VMBus channel.
uint64_t pfn[0]
Page frame numbers.
struct hv_hypervisor * hv
Hyper-V hypervisor.
struct vmbus_initiate_contact initiate
"Initiate contact" message
static struct tlan_private * priv
VMBus channel operations.
struct vmbus_message_header header
Message header.
unsigned int gpadl
Ring buffer GPADL ID.
VMBus "offer channel" message.
uint8_t reserved_a[16]
Reserved.
uint8_t data[120]
User data.
struct vmbus_open_channel_result opened
"Open channel result" message
struct vmbus_interrupt * intr
Interrupt page.
struct vmbus_gpadl_teardown teardown
"GPADL teardown" message
struct vmbus_message_header header
Message header.
uint8_t data[48]
Additional event data.
int vmbus_send_completion(struct vmbus_device *vmdev, uint64_t xid, const void *data, size_t len)
Send completion packet via ring buffer.
union uuid instance
Channel instance.
union uuid instance
Channel instance.
int(* probe)(struct vmbus_device *vmdev)
Probe device.
void(* remove)(struct vmbus_device *vmdev)
Remove device.
uint16_t major
Major version.
uint16_t offset
Offset to command line.
struct hv_monitor * monitor_out
Outbound notifications.
VMBus "GPADL teardown" message.
void(* signal)(struct vmbus_device *vmdev)
Signal channel.
uint32_t out_pages
Outbound ring buffer size (in pages)
static void vmbus_set_drvdata(struct vmbus_device *vmdev, void *priv)
Set VMBus device driver-private data.
uint8_t reserved[2]
Reserved.
struct vmbus_message_header header
Message header.
#define list_check_contains_entry(entry, head, member)
Check list contains a specified entry.
struct list_head pages
List of transfer page sets.
struct vmbus_message_header header
Common message header.
size_t mtu
Maximum expected data packet length.
uint8_t reserved_c[4]
Reserved.
void vmbus_remove(struct hv_hypervisor *hv, struct device *parent)
Remove Hyper-V virtual machine bus.
int vmbus_reset(struct hv_hypervisor *hv, struct device *parent)
Reset Hyper-V virtual machine bus.
VMBus transfer page range.
struct vmbus_message_header header
Message header.
int(* recv_cancellation)(struct vmbus_device *vmdev, uint64_t xid)
Handle received cancellation packet.
uint32_t channel
Channel ID.
int(* reset)(struct vmbus_device *vmdev)
Reset device.
uint32_t gpadl
Ring buffer GPADL ID.