From bf3938dec68e1c820063db4f63aa2355c5703e4b Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 24 May 2021 10:42:42 +0100 Subject: fix region offset handling (#485) The specification states that the region offset given in the region info should be used as the "offset" when mmap()ing the region from the client side. However, the library instead implemented a fixed offset scheme similar to that of vfio - and no clients actually set up the file like that. Instead, let servers define their own offsets, and pass them through to clients as is. It's up to the server to decide how its backing file or files is organized. Signed-off-by: John Levon Reviewed-by: Thanos Makatos --- docs/vfio-user.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/vfio-user.rst') diff --git a/docs/vfio-user.rst b/docs/vfio-user.rst index e0c331c..46b2081 100644 --- a/docs/vfio-user.rst +++ b/docs/vfio-user.rst @@ -868,9 +868,9 @@ VFIO region info format The data structure it points is a VFIO cap header defined in ````. * *size* is the size of the region. -* *offset* is the offset given to the mmap() system call for regions with the - MMAP attribute. It is also used as the base offset when mapping a VFIO - sparse mmap area, described below. +* *offset* is the offset that should be given to the mmap() system call for + regions with the MMAP attribute. It is also used as the base offset when + mapping a VFIO sparse mmap area, described below. The client sets the ``argsz`` field to indicate the maximum size of the response that the server can send, which must be at least the size of the -- cgit v1.1