From ae4c7c829b5791629e3b711aff05a528ce2a1a00 Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Wed, 13 Jan 2021 13:39:36 +0000 Subject: make vfu_region_to_offset public (#228) Signed-off-by: Thanos Makatos --- include/libvfio-user.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/libvfio-user.h') diff --git a/include/libvfio-user.h b/include/libvfio-user.h index d74087e..2bf0cd1 100644 --- a/include/libvfio-user.h +++ b/include/libvfio-user.h @@ -644,6 +644,16 @@ size_t vfu_pci_find_next_capability(vfu_ctx_t *vfu_ctx, bool extended, size_t pos, int cap_id); +/** + * Returns the memory offset where the specific region starts in device memory. + * + * @region: the region to translate + * + * @returns the absolute offset + */ +uint64_t +vfu_region_to_offset(uint32_t region); + #ifdef __cplusplus } #endif -- cgit v1.1