Lines Matching full:vdev

27 static inline bool virtio_access_is_big_endian(VirtIODevice *vdev)  in virtio_access_is_big_endian()  argument
30 return virtio_is_big_endian(vdev); in virtio_access_is_big_endian()
32 if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) { in virtio_access_is_big_endian()
42 static inline uint16_t virtio_lduw_phys(VirtIODevice *vdev, hwaddr pa) in virtio_lduw_phys() argument
44 AddressSpace *dma_as = vdev->dma_as; in virtio_lduw_phys()
46 if (virtio_access_is_big_endian(vdev)) { in virtio_lduw_phys()
52 static inline uint32_t virtio_ldl_phys(VirtIODevice *vdev, hwaddr pa) in virtio_ldl_phys() argument
54 AddressSpace *dma_as = vdev->dma_as; in virtio_ldl_phys()
56 if (virtio_access_is_big_endian(vdev)) { in virtio_ldl_phys()
62 static inline uint64_t virtio_ldq_phys(VirtIODevice *vdev, hwaddr pa) in virtio_ldq_phys() argument
64 AddressSpace *dma_as = vdev->dma_as; in virtio_ldq_phys()
66 if (virtio_access_is_big_endian(vdev)) { in virtio_ldq_phys()
72 static inline void virtio_stw_phys(VirtIODevice *vdev, hwaddr pa, in virtio_stw_phys() argument
75 AddressSpace *dma_as = vdev->dma_as; in virtio_stw_phys()
77 if (virtio_access_is_big_endian(vdev)) { in virtio_stw_phys()
84 static inline void virtio_stl_phys(VirtIODevice *vdev, hwaddr pa, in virtio_stl_phys() argument
87 AddressSpace *dma_as = vdev->dma_as; in virtio_stl_phys()
89 if (virtio_access_is_big_endian(vdev)) { in virtio_stl_phys()
96 static inline void virtio_stw_p(VirtIODevice *vdev, void *ptr, uint16_t v) in virtio_stw_p() argument
98 if (virtio_access_is_big_endian(vdev)) { in virtio_stw_p()
105 static inline void virtio_stl_p(VirtIODevice *vdev, void *ptr, uint32_t v) in virtio_stl_p() argument
107 if (virtio_access_is_big_endian(vdev)) { in virtio_stl_p()
114 static inline void virtio_stq_p(VirtIODevice *vdev, void *ptr, uint64_t v) in virtio_stq_p() argument
116 if (virtio_access_is_big_endian(vdev)) { in virtio_stq_p()
123 static inline int virtio_lduw_p(VirtIODevice *vdev, const void *ptr) in virtio_lduw_p() argument
125 if (virtio_access_is_big_endian(vdev)) { in virtio_lduw_p()
132 static inline int virtio_ldl_p(VirtIODevice *vdev, const void *ptr) in virtio_ldl_p() argument
134 if (virtio_access_is_big_endian(vdev)) { in virtio_ldl_p()
141 static inline uint64_t virtio_ldq_p(VirtIODevice *vdev, const void *ptr) in virtio_ldq_p() argument
143 if (virtio_access_is_big_endian(vdev)) { in virtio_ldq_p()
150 static inline uint16_t virtio_tswap16(VirtIODevice *vdev, uint16_t s) in virtio_tswap16() argument
153 return virtio_access_is_big_endian(vdev) ? s : bswap16(s); in virtio_tswap16()
155 return virtio_access_is_big_endian(vdev) ? bswap16(s) : s; in virtio_tswap16()
159 static inline uint16_t virtio_lduw_phys_cached(VirtIODevice *vdev, in virtio_lduw_phys_cached() argument
163 if (virtio_access_is_big_endian(vdev)) { in virtio_lduw_phys_cached()
169 static inline uint32_t virtio_ldl_phys_cached(VirtIODevice *vdev, in virtio_ldl_phys_cached() argument
173 if (virtio_access_is_big_endian(vdev)) { in virtio_ldl_phys_cached()
179 static inline uint64_t virtio_ldq_phys_cached(VirtIODevice *vdev, in virtio_ldq_phys_cached() argument
183 if (virtio_access_is_big_endian(vdev)) { in virtio_ldq_phys_cached()
189 static inline void virtio_stw_phys_cached(VirtIODevice *vdev, in virtio_stw_phys_cached() argument
193 if (virtio_access_is_big_endian(vdev)) { in virtio_stw_phys_cached()
200 static inline void virtio_stl_phys_cached(VirtIODevice *vdev, in virtio_stl_phys_cached() argument
204 if (virtio_access_is_big_endian(vdev)) { in virtio_stl_phys_cached()
211 static inline void virtio_tswap16s(VirtIODevice *vdev, uint16_t *s) in virtio_tswap16s() argument
213 *s = virtio_tswap16(vdev, *s); in virtio_tswap16s()
216 static inline uint32_t virtio_tswap32(VirtIODevice *vdev, uint32_t s) in virtio_tswap32() argument
219 return virtio_access_is_big_endian(vdev) ? s : bswap32(s); in virtio_tswap32()
221 return virtio_access_is_big_endian(vdev) ? bswap32(s) : s; in virtio_tswap32()
225 static inline void virtio_tswap32s(VirtIODevice *vdev, uint32_t *s) in virtio_tswap32s() argument
227 *s = virtio_tswap32(vdev, *s); in virtio_tswap32s()
230 static inline uint64_t virtio_tswap64(VirtIODevice *vdev, uint64_t s) in virtio_tswap64() argument
233 return virtio_access_is_big_endian(vdev) ? s : bswap64(s); in virtio_tswap64()
235 return virtio_access_is_big_endian(vdev) ? bswap64(s) : s; in virtio_tswap64()
239 static inline void virtio_tswap64s(VirtIODevice *vdev, uint64_t *s) in virtio_tswap64s() argument
241 *s = virtio_tswap64(vdev, *s); in virtio_tswap64s()