There are two feature bits for virtio-balloon:

   VIRTIO_BALLOON_F_MUST_TELL_HOST, and
   VIRTIO_BALLOON_F_STATS_VQ.

Since these features don't require additional fields in the config struct,
set the 'end' field to the end of the last field in the struct.

Signed-off-by: Jesse Larrew <jlar...@linux.vnet.ibm.com>
---
 hw/virtio-balloon.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
index 81f27e9..c64e1b7 100644
--- a/hw/virtio-balloon.c
+++ b/hw/virtio-balloon.c
@@ -30,8 +30,10 @@
 #endif
 
 static VirtIOFeature feature_sizes[] = {
-    {.flags = 0xffffffff, /* dummy table -- all features included. */
-     .end = sizeof(struct virtio_balloon_config)},
+    {.flags = 1 << VIRTIO_BALLOON_F_MUST_TELL_HOST,
+     .end = endof(struct virtio_balloon_config, actual)},
+    {.flags = 1 << VIRTIO_BALLOON_F_STATS_VQ,
+     .end = endof(struct virtio_balloon_config, actual)},
     {}
 };
 
-- 
1.7.11.7


Reply via email to