qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] vhost-user: Check vhost features for CONFIGURE_MEM_SLOTS


From: Dylan Reid
Subject: [PATCH] vhost-user: Check vhost features for CONFIGURE_MEM_SLOTS
Date: Tue, 22 Dec 2020 15:41:26 -0800

The `CONFIGURE_MEM_SLOTS` feature is specified by vhost, not by virtio.
Check the vhost flags for it being set.

I noticed this while testing a new vhost implementation that doesn't yet
support configuring memory slots and retested with dpdk's block example
as well.

Signed-off-by: Dylan Reid <dgreid@dylanreid.com>
---
 hw/virtio/vhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 2fdd5daf74..faa0e133f2 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -1860,7 +1860,7 @@ static int vhost_user_backend_init(struct vhost_dev *dev, 
void *opaque)
         }
 
         /* get max memory regions if backend supports configurable RAM slots */
-        if (!virtio_has_feature(dev->protocol_features,
+        if (!virtio_has_feature(features,
                                 VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS)) {
             u->user->memory_slots = VHOST_MEMORY_BASELINE_NREGIONS;
         } else {
-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]