<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, May 5, 2026 at 7:53 AM <<a href="mailto:pravin.bathija@dell.com">pravin.bathija@dell.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Pravin M Bathija <<a href="mailto:pravin.bathija@dell.com" target="_blank">pravin.bathija@dell.com</a>><br>
<br>
The changes in this file cover the enum message requests for<br>
supporting add/remove memory regions. The front-end vhost-user<br>
client sends messages like get max memory slots, add memory region<br>
and remove memory region which are covered in these changes which<br>
are on the vhost-user back-end. The changes also include data structure<br>
definition of memory region to be added/removed. The data structure<br>
VhostUserMsg has been changed to include the memory region.<br>
<br>
Signed-off-by: Pravin M Bathija <<a href="mailto:pravin.bathija@dell.com" target="_blank">pravin.bathija@dell.com</a>><br>
---<br>
lib/vhost/vhost_user.h | 9 +++++++++<br>
1 file changed, 9 insertions(+)<br>
<br>
diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h<br>
index ef486545ba..f8d921f7f1 100644<br>
--- a/lib/vhost/vhost_user.h<br>
+++ b/lib/vhost/vhost_user.h<br>
@@ -67,6 +67,9 @@ typedef enum VhostUserRequest {<br>
VHOST_USER_POSTCOPY_END = 30,<br>
VHOST_USER_GET_INFLIGHT_FD = 31,<br>
VHOST_USER_SET_INFLIGHT_FD = 32,<br>
+ VHOST_USER_GET_MAX_MEM_SLOTS = 36,<br>
+ VHOST_USER_ADD_MEM_REG = 37,<br>
+ VHOST_USER_REM_MEM_REG = 38,<br>
VHOST_USER_SET_STATUS = 39,<br>
VHOST_USER_GET_STATUS = 40,<br>
} VhostUserRequest;<br>
@@ -91,6 +94,11 @@ typedef struct VhostUserMemory {<br>
VhostUserMemoryRegion regions[VHOST_MEMORY_MAX_NREGIONS];<br>
} VhostUserMemory;<br>
<br>
+typedef struct VhostUserSingleMemReg {<br>
+ uint64_t padding;<br>
+ VhostUserMemoryRegion region;<br>
+} VhostUserSingleMemReg;<br>
+<br>
typedef struct VhostUserLog {<br>
uint64_t mmap_size;<br>
uint64_t mmap_offset;<br>
@@ -186,6 +194,7 @@ typedef struct __rte_packed_begin VhostUserMsg {<br>
struct vhost_vring_state state;<br>
struct vhost_vring_addr addr;<br>
VhostUserMemory memory;<br>
+ VhostUserSingleMemReg memory_single;<br>
VhostUserLog log;<br>
struct vhost_iotlb_msg iotlb;<br>
VhostUserCryptoSessionParam crypto_session;<br>
-- <br>
2.43.0<br>
<br></blockquote><div><br></div><div><div><br></div><div>Reviewed-by: Maxime Coquelin <<a href="mailto:maxime.coquelin@redhat.com">maxime.coquelin@redhat.com</a>></div><div><br></div><div>Thanks,</div><div>Maxime </div> </div></div></div>