• Home
  • Raw
  • Download

Lines Matching refs:offset

237 static void handle_pci_cfg_write(struct mdev_state *mdev_state, u16 offset,  in handle_pci_cfg_write()  argument
242 switch (offset) { in handle_pci_cfg_write()
258 if (offset == 0x10) in handle_pci_cfg_write()
260 else if (offset == 0x14) in handle_pci_cfg_write()
264 STORE_LE32(&mdev_state->vconfig[offset], 0); in handle_pci_cfg_write()
276 cfg_addr |= (mdev_state->vconfig[offset] & 0x3ul); in handle_pci_cfg_write()
277 STORE_LE32(&mdev_state->vconfig[offset], cfg_addr); in handle_pci_cfg_write()
282 STORE_LE32(&mdev_state->vconfig[offset], 0); in handle_pci_cfg_write()
286 offset, count); in handle_pci_cfg_write()
292 u16 offset, u8 *buf, u32 count) in handle_bar_write() argument
297 switch (offset) { in handle_bar_write()
353 mdev_state->s[index].uart_reg[offset] = data; in handle_bar_write()
422 mdev_state->s[index].uart_reg[offset] = data; in handle_bar_write()
426 mdev_state->s[index].uart_reg[offset] = data; in handle_bar_write()
451 mdev_state->s[index].uart_reg[offset] = data; in handle_bar_write()
460 u16 offset, u8 *buf, u32 count) in handle_bar_read() argument
463 switch (offset) { in handle_bar_read()
503 *buf = mdev_state->s[index].uart_reg[offset] & 0x0f; in handle_bar_read()
546 *buf = mdev_state->s[index].uart_reg[offset]; in handle_bar_read()
589 *buf = mdev_state->s[index].uart_reg[offset]; in handle_bar_read()
639 loff_t offset; in mdev_access() local
654 offset = pos & MTTY_VFIO_PCI_OFFSET_MASK; in mdev_access()
660 __func__, is_write ? "write" : "read", offset); in mdev_access()
664 handle_pci_cfg_write(mdev_state, offset, buf, count); in mdev_access()
666 memcpy(buf, (mdev_state->vconfig + offset), count); in mdev_access()
681 __func__, index, offset, wr_reg[offset], in mdev_access()
684 handle_bar_write(index, mdev_state, offset, buf, count); in mdev_access()
686 handle_bar_read(index, mdev_state, offset, buf, count); in mdev_access()
691 __func__, index, offset, rd_reg[offset], in mdev_access()
1085 region_info->offset = MTTY_VFIO_PCI_INDEX_TO_OFFSET(bar_index); in mtty_get_region_info()
1171 minsz = offsetofend(struct vfio_region_info, offset); in mtty_ioctl()