diff options
Diffstat (limited to 'wmediumd/inc')
-rw-r--r-- | wmediumd/inc/usfstl/vhost.h | 7 | ||||
-rw-r--r-- | wmediumd/inc/usfstl/vhostproto.h | 15 |
2 files changed, 21 insertions, 1 deletions
diff --git a/wmediumd/inc/usfstl/vhost.h b/wmediumd/inc/usfstl/vhost.h index 017d0b5..85a76d9 100644 --- a/wmediumd/inc/usfstl/vhost.h +++ b/wmediumd/inc/usfstl/vhost.h @@ -141,6 +141,13 @@ void usfstl_vhost_user_config_changed(struct usfstl_vhost_user_dev *dev); void *usfstl_vhost_user_to_va(struct usfstl_vhost_user_dev *dev, uint64_t addr); /** + * usfstl_vhost_user_to_va - translate address + * @dev: device to translate address for + * @addr: host-side virtual addr + */ +uint64_t usfstl_vhost_user_to_phys(struct usfstl_vhost_user_dev *dev, uint64_t addr); + +/** * usfstl_vhost_phys_to_va - translate address * @dev: device to translate address for * @addr: guest-side physical addr diff --git a/wmediumd/inc/usfstl/vhostproto.h b/wmediumd/inc/usfstl/vhostproto.h index 579af54..28756fa 100644 --- a/wmediumd/inc/usfstl/vhostproto.h +++ b/wmediumd/inc/usfstl/vhostproto.h @@ -33,10 +33,23 @@ struct vhost_user_region { uint64_t mmap_offset; }; +struct vring_snapshot { + int8_t enabled; + int8_t sleeping; + int8_t triggered; + + unsigned int num; + uint64_t desc_guest_addr; + uint64_t avail_guest_addr; + uint64_t used_guest_addr; + uint16_t last_avail_idx; +}; + struct vhost_user_snapshot { - int8_t sleeping[NUM_SNAPSHOT_QUEUES]; + struct vring_snapshot vrings[NUM_SNAPSHOT_QUEUES]; }; + struct vhost_user_msg { struct vhost_user_msg_hdr hdr; union { |