History

PCI: hv: Add a Hyper-V PCI interface driver for software backchannel interface

This interface driver is a helper driver allows other drivers to have a common interface with the Hyper-V PCI frontend driver.

Haiyang Zhang committed 7 years ago

Commit 348dd931 parent e5d2f917 files · +108 −11Browse files

Showing the changes to include/linux (1 of 7 files). Show all

Unified · Split

include/linux/hyperv.h+22−8
@@ -1579,18 +1579,32 @@ hv_pkt_iter_next(struct vmbus_channel *channel, · 1578 unmodified lines
1579 pkt = hv_pkt_iter_next(channel, pkt))1579 pkt = hv_pkt_iter_next(channel, pkt))
1580 1580
1581/*1581/*
1582 * Functions for passing data between SR-IOV PF and VF drivers. The VF driver1582 * Interface for passing data between SR-IOV PF and VF drivers. The VF driver
1583 * sends requests to read and write blocks. Each block must be 128 bytes or1583 * sends requests to read and write blocks. Each block must be 128 bytes or
1584 * smaller. Optionally, the VF driver can register a callback function which1584 * smaller. Optionally, the VF driver can register a callback function which
1585 * will be invoked when the host says that one or more of the first 64 block1585 * will be invoked when the host says that one or more of the first 64 block
1586 * IDs is "invalid" which means that the VF driver should reread them.1586 * IDs is "invalid" which means that the VF driver should reread them.
1587 */1587 */
1588#define HV_CONFIG_BLOCK_SIZE_MAX 1281588#define HV_CONFIG_BLOCK_SIZE_MAX 128
1589int hv_read_config_block(struct pci_dev *dev, void *buf, unsigned int buf_len,1589
1590 unsigned int block_id, unsigned int *bytes_returned);1590int hyperv_read_cfg_blk(struct pci_dev *dev, void *buf, unsigned int buf_len,
1591int hv_write_config_block(struct pci_dev *dev, void *buf, unsigned int len,1591 unsigned int block_id, unsigned int *bytes_returned);
1592 unsigned int block_id);1592int hyperv_write_cfg_blk(struct pci_dev *dev, void *buf, unsigned int len,
1593int hv_register_block_invalidate(struct pci_dev *dev, void *context,1593 unsigned int block_id);
1594 void (*block_invalidate)(void *context,1594int hyperv_reg_block_invalidate(struct pci_dev *dev, void *context,
1595 u64 block_mask));1595 void (*block_invalidate)(void *context,
1596 u64 block_mask));
1597
1598struct hyperv_pci_block_ops {
1599 int (*read_block)(struct pci_dev *dev, void *buf, unsigned int buf_len,
1600 unsigned int block_id, unsigned int *bytes_returned);
1601 int (*write_block)(struct pci_dev *dev, void *buf, unsigned int len,
1602 unsigned int block_id);
1603 int (*reg_blk_invalidate)(struct pci_dev *dev, void *context,
1604 void (*block_invalidate)(void *context,
1605 u64 block_mask));
1606};
1607
1608extern struct hyperv_pci_block_ops hvpci_block_ops;
1609
1596#endif /* _HYPERV_H */1610#endif /* _HYPERV_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t