From 46e797c4d34c1340eb981fa599f49f82b2ba5f41 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Wed, 25 Jun 2014 14:49:36 +0200 Subject: vhost-user: fix wrong ids in documentation Signed-off-by: Damjan Marion Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/specs/vhost-user.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'docs/specs') diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 0ea767e..2641390 100644 --- a/docs/specs/vhost-user.txt +++ b/docs/specs/vhost-user.txt @@ -132,7 +132,7 @@ Message types * VHOST_USER_GET_FEATURES - Id: 2 + Id: 1 Equivalent ioctl: VHOST_GET_FEATURES Master payload: N/A Slave payload: u64 @@ -141,7 +141,7 @@ Message types * VHOST_USER_SET_FEATURES - Id: 3 + Id: 2 Ioctl: VHOST_SET_FEATURES Master payload: u64 @@ -149,7 +149,7 @@ Message types * VHOST_USER_SET_OWNER - Id: 4 + Id: 3 Equivalent ioctl: VHOST_SET_OWNER Master payload: N/A @@ -159,7 +159,7 @@ Message types * VHOST_USER_RESET_OWNER - Id: 5 + Id: 4 Equivalent ioctl: VHOST_RESET_OWNER Master payload: N/A @@ -168,7 +168,7 @@ Message types * VHOST_USER_SET_MEM_TABLE - Id: 6 + Id: 5 Equivalent ioctl: VHOST_SET_MEM_TABLE Master payload: memory regions description @@ -179,7 +179,7 @@ Message types * VHOST_USER_SET_LOG_BASE - Id: 7 + Id: 6 Equivalent ioctl: VHOST_SET_LOG_BASE Master payload: u64 @@ -187,7 +187,7 @@ Message types * VHOST_USER_SET_LOG_FD - Id: 8 + Id: 7 Equivalent ioctl: VHOST_SET_LOG_FD Master payload: N/A @@ -195,7 +195,7 @@ Message types * VHOST_USER_SET_VRING_NUM - Id: 9 + Id: 8 Equivalent ioctl: VHOST_SET_VRING_NUM Master payload: vring state description @@ -203,7 +203,7 @@ Message types * VHOST_USER_SET_VRING_ADDR - Id: 10 + Id: 9 Equivalent ioctl: VHOST_SET_VRING_ADDR Master payload: vring address description Slave payload: N/A @@ -212,7 +212,7 @@ Message types * VHOST_USER_SET_VRING_BASE - Id: 11 + Id: 10 Equivalent ioctl: VHOST_SET_VRING_BASE Master payload: vring state description @@ -220,7 +220,7 @@ Message types * VHOST_USER_GET_VRING_BASE - Id: 12 + Id: 11 Equivalent ioctl: VHOST_USER_GET_VRING_BASE Master payload: vring state description Slave payload: vring state description @@ -229,7 +229,7 @@ Message types * VHOST_USER_SET_VRING_KICK - Id: 13 + Id: 12 Equivalent ioctl: VHOST_SET_VRING_KICK Master payload: u64 @@ -242,7 +242,7 @@ Message types * VHOST_USER_SET_VRING_CALL - Id: 14 + Id: 13 Equivalent ioctl: VHOST_SET_VRING_CALL Master payload: u64 @@ -255,7 +255,7 @@ Message types * VHOST_USER_SET_VRING_ERR - Id: 15 + Id: 14 Equivalent ioctl: VHOST_SET_VRING_ERR Master payload: u64 -- cgit v1.1 From 3fd74b84076488ae44ba5f3cfed22ff056c5199c Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 26 Jun 2014 23:01:32 +0200 Subject: vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message Old code was affected by memory gaps which resulted in buffer pointers pointing to address outside of the mapped regions. Here we are introducing following changes: - new function qemu_get_ram_block_host_ptr() returns host pointer to the ram block, it is needed to calculate offset of specific region in the host memory - new field mmap_offset is added to the VhostUserMemoryRegion. It contains offset where specific region starts in the mapped memory. As there is stil no wider adoption of vhost-user agreement was made that we will not bump version number due to this change - other fileds in VhostUserMemoryRegion struct are not changed, as they are all needed for usermode app implementation - region data is not taken from ram_list.blocks anymore, instead we use region data which is alredy calculated for use in vhost-net - Now multiple regions can have same FD and user applicaton can call mmap() multiple times with the same FD but with different offset (user needs to take care for offset page alignment) Signed-off-by: Damjan Marion Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Signed-off-by: Damjan Marion --- docs/specs/vhost-user.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/specs') diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 2641390..6abb697 100644 --- a/docs/specs/vhost-user.txt +++ b/docs/specs/vhost-user.txt @@ -78,13 +78,14 @@ Depending on the request type, payload can be: Padding: 32-bit A region is: - --------------------------------------- - | guest address | size | user address | - --------------------------------------- + ----------------------------------------------------- + | guest address | size | user address | mmap offset | + ----------------------------------------------------- Guest address: a 64-bit guest address of the region Size: a 64-bit size User address: a 64-bit user address + mmmap offset: 64-bit offset where region starts in the mapped memory In QEMU the vhost-user message is implemented with the following struct: -- cgit v1.1 From a628fc8dae4c4a9a70f020ab65018a6e085a2088 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Sun, 29 Jun 2014 17:58:48 +0300 Subject: vhost-user: typo fixups Fix typo in field name. Strip two consequitive empty lines. Signed-off-by: Michael S. Tsirkin --- docs/specs/vhost-user.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'docs/specs') diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 6abb697..650bb18 100644 --- a/docs/specs/vhost-user.txt +++ b/docs/specs/vhost-user.txt @@ -85,8 +85,7 @@ Depending on the request type, payload can be: Guest address: a 64-bit guest address of the region Size: a 64-bit size User address: a 64-bit user address - mmmap offset: 64-bit offset where region starts in the mapped memory - + mmap offset: 64-bit offset where region starts in the mapped memory In QEMU the vhost-user message is implemented with the following struct: -- cgit v1.1