From 2bf46f24e64bbca253ffa1c6f3d8a11d0dcfa55b Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 30 May 2024 13:47:35 +0100 Subject: [PATCH] bump MAX_DMA_REGIONS (#800) Some perfectly reasonable VMs exceed 16 VMs; bump this up somewhat. Signed-off-by: John Levon --- lib/private.h | 2 +- test/py/libvfio_user.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private.h b/lib/private.h index 6e0170ed..e3d97b32 100644 --- a/lib/private.h +++ b/lib/private.h @@ -50,7 +50,7 @@ #else #define MAX_DMA_SIZE UINT32_MAX /* FIXME check for __i386__ etc? */ #endif -#define MAX_DMA_REGIONS 16 +#define MAX_DMA_REGIONS 64 #define SERVER_MAX_DATA_XFER_SIZE (VFIO_USER_DEFAULT_MAX_DATA_XFER_SIZE) diff --git a/test/py/libvfio_user.py b/test/py/libvfio_user.py index 976590ca..e68e126b 100644 --- a/test/py/libvfio_user.py +++ b/test/py/libvfio_user.py @@ -160,7 +160,7 @@ def is_32bit(): return (1 << 31) - 1 == sys.maxsize -MAX_DMA_REGIONS = 16 +MAX_DMA_REGIONS = 64 # FIXME get from libvfio-user.h MAX_DMA_SIZE = sys.maxsize << 1 if is_32bit() else (8 * ONE_TB)