diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2019-06-26 08:48:12 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-07-04 17:00:32 -0400 |
commit | db68f4ff06cbe0517ed0d9b5634f6cddaed2547c (patch) | |
tree | 09127383fdd8160bb275cd2594fb8e6e17bdfb34 /qom | |
parent | 457cfcccdd107a968d106934df63b836b5dd743e (diff) | |
download | qemu-db68f4ff06cbe0517ed0d9b5634f6cddaed2547c.zip qemu-db68f4ff06cbe0517ed0d9b5634f6cddaed2547c.tar.gz qemu-db68f4ff06cbe0517ed0d9b5634f6cddaed2547c.tar.bz2 |
libvhost-user: add vmsg_set_reply_u64() helper
The VhostUserMsg request is reused as the reply by message processing
functions. This is risky since request fields may corrupt the reply if
the vhost-user message handler function forgets to re-initialize them.
Changing this practice would be very invasive but we can introduce a
helper function to make u64 payload replies safe. This also eliminates
code duplication in message processing functions.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190626074815.19994-2-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'qom')
0 files changed, 0 insertions, 0 deletions