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
15791579 pkt = hv_pkt_iter_next(channel, pkt))
15801580
15811581 /*
1582− * Functions for passing data between SR-IOV PF and VF drivers. The VF driver
1582+ * Interface for passing data between SR-IOV PF and VF drivers. The VF driver
15831583 * sends requests to read and write blocks. Each block must be 128 bytes or
15841584 * smaller. Optionally, the VF driver can register a callback function which
15851585 * will be invoked when the host says that one or more of the first 64 block
15861586 * IDs is "invalid" which means that the VF driver should reread them.
15871587 */
15881588 #define HV_CONFIG_BLOCK_SIZE_MAX 128
1589−int hv_read_config_block(struct pci_dev *dev, void *buf, unsigned int buf_len,
1590− unsigned int block_id, unsigned int *bytes_returned);
1591−int hv_write_config_block(struct pci_dev *dev, void *buf, unsigned int len,
1592− unsigned int block_id);
1593−int hv_register_block_invalidate(struct pci_dev *dev, void *context,
1594− void (*block_invalidate)(void *context,
1595− u64 block_mask));
1589+
1590+int hyperv_read_cfg_blk(struct pci_dev *dev, void *buf, unsigned int buf_len,
1591+ unsigned int block_id, unsigned int *bytes_returned);
1592+int hyperv_write_cfg_blk(struct pci_dev *dev, void *buf, unsigned int len,
1593+ unsigned int block_id);
1594+int hyperv_reg_block_invalidate(struct pci_dev *dev, void *context,
1595+ void (*block_invalidate)(void *context,
1596+ u64 block_mask));
1597+
1598+struct 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+
1608+extern struct hyperv_pci_block_ops hvpci_block_ops;
1609+
15961610 #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