Lines Matching full:vdev
16 uint32_t virtio_config_readb(VirtIODevice *vdev, uint32_t addr) in virtio_config_readb() argument
18 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_readb()
21 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_readb()
25 k->get_config(vdev, vdev->config); in virtio_config_readb()
27 val = ldub_p(vdev->config + addr); in virtio_config_readb()
31 uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr) in virtio_config_readw() argument
33 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_readw()
36 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_readw()
40 k->get_config(vdev, vdev->config); in virtio_config_readw()
42 val = lduw_p(vdev->config + addr); in virtio_config_readw()
46 uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr) in virtio_config_readl() argument
48 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_readl()
51 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_readl()
55 k->get_config(vdev, vdev->config); in virtio_config_readl()
57 val = ldl_p(vdev->config + addr); in virtio_config_readl()
61 void virtio_config_writeb(VirtIODevice *vdev, uint32_t addr, uint32_t data) in virtio_config_writeb() argument
63 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_writeb()
66 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_writeb()
70 stb_p(vdev->config + addr, val); in virtio_config_writeb()
73 k->set_config(vdev, vdev->config); in virtio_config_writeb()
77 void virtio_config_writew(VirtIODevice *vdev, uint32_t addr, uint32_t data) in virtio_config_writew() argument
79 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_writew()
82 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_writew()
86 stw_p(vdev->config + addr, val); in virtio_config_writew()
89 k->set_config(vdev, vdev->config); in virtio_config_writew()
93 void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data) in virtio_config_writel() argument
95 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_writel()
98 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_writel()
102 stl_p(vdev->config + addr, val); in virtio_config_writel()
105 k->set_config(vdev, vdev->config); in virtio_config_writel()
109 uint32_t virtio_config_modern_readb(VirtIODevice *vdev, uint32_t addr) in virtio_config_modern_readb() argument
111 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_modern_readb()
114 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_modern_readb()
118 k->get_config(vdev, vdev->config); in virtio_config_modern_readb()
120 val = ldub_p(vdev->config + addr); in virtio_config_modern_readb()
124 uint32_t virtio_config_modern_readw(VirtIODevice *vdev, uint32_t addr) in virtio_config_modern_readw() argument
126 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_modern_readw()
129 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_modern_readw()
133 k->get_config(vdev, vdev->config); in virtio_config_modern_readw()
135 val = lduw_le_p(vdev->config + addr); in virtio_config_modern_readw()
139 uint32_t virtio_config_modern_readl(VirtIODevice *vdev, uint32_t addr) in virtio_config_modern_readl() argument
141 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_modern_readl()
144 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_modern_readl()
148 k->get_config(vdev, vdev->config); in virtio_config_modern_readl()
150 val = ldl_le_p(vdev->config + addr); in virtio_config_modern_readl()
154 void virtio_config_modern_writeb(VirtIODevice *vdev, in virtio_config_modern_writeb() argument
157 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_modern_writeb()
160 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_modern_writeb()
164 stb_p(vdev->config + addr, val); in virtio_config_modern_writeb()
167 k->set_config(vdev, vdev->config); in virtio_config_modern_writeb()
171 void virtio_config_modern_writew(VirtIODevice *vdev, in virtio_config_modern_writew() argument
174 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_modern_writew()
177 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_modern_writew()
181 stw_le_p(vdev->config + addr, val); in virtio_config_modern_writew()
184 k->set_config(vdev, vdev->config); in virtio_config_modern_writew()
188 void virtio_config_modern_writel(VirtIODevice *vdev, in virtio_config_modern_writel() argument
191 VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); in virtio_config_modern_writel()
194 if (addr + sizeof(val) > vdev->config_len) { in virtio_config_modern_writel()
198 stl_le_p(vdev->config + addr, val); in virtio_config_modern_writel()
201 k->set_config(vdev, vdev->config); in virtio_config_modern_writel()