diff options
author | Stefan Hajnoczi | 2019-06-26 09:48:12 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2019-07-04 23:00:32 +0200 |
commit | db68f4ff06cbe0517ed0d9b5634f6cddaed2547c (patch) | |
tree | 09127383fdd8160bb275cd2594fb8e6e17bdfb34 /contrib/libvhost-user/libvhost-user.h | |
parent | pc: Move compat_apic_id_mode variable to PCMachineClass (diff) | |
download | qemu-db68f4ff06cbe0517ed0d9b5634f6cddaed2547c.tar.gz qemu-db68f4ff06cbe0517ed0d9b5634f6cddaed2547c.tar.xz qemu-db68f4ff06cbe0517ed0d9b5634f6cddaed2547c.zip |
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 'contrib/libvhost-user/libvhost-user.h')
0 files changed, 0 insertions, 0 deletions