qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 5/8] virtio-balloon: fill in the table of feature_si


From: Jesse Larrew
Subject: [Qemu-devel] [PATCH 5/8] virtio-balloon: fill in the table of feature_sizes
Date: Mon, 18 Feb 2013 16:22:42 -0600

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 <address@hidden>
---
 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

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