Lines Matching refs:mem
46 struct vhost_memory *mem; member
141 dev->mem = malloc(offsetof(struct vhost_memory, regions) + in vdev_info_init()
142 sizeof dev->mem->regions[0]); in vdev_info_init()
143 assert(dev->mem); in vdev_info_init()
144 memset(dev->mem, 0, offsetof(struct vhost_memory, regions) + in vdev_info_init()
145 sizeof dev->mem->regions[0]); in vdev_info_init()
146 dev->mem->nregions = 1; in vdev_info_init()
147 dev->mem->regions[0].guest_phys_addr = (long)dev->buf; in vdev_info_init()
148 dev->mem->regions[0].userspace_addr = (long)dev->buf; in vdev_info_init()
149 dev->mem->regions[0].memory_size = dev->buf_size; in vdev_info_init()
150 r = ioctl(dev->control, VHOST_SET_MEM_TABLE, dev->mem); in vdev_info_init()