| Submitter | Jesse Larrew |
|---|---|
| Date | Feb. 18, 2013, 10:22 p.m. |
| Message ID | <1361226165-19030-6-git-send-email-jlarrew@linux.vnet.ibm.com> |
| Download | mbox | patch |
| Permalink | /patch/221565/ |
| State | New |
| Headers | show |
Comments
Patch
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)}, {} };
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 <jlarrew@linux.vnet.ibm.com> --- hw/virtio-balloon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)