diff options
author | William Henderson <william.henderson@nutanix.com> | 2023-07-21 12:24:12 +0000 |
---|---|---|
committer | John Levon <john.levon@nutanix.com> | 2023-09-15 12:59:39 +0100 |
commit | 5ab273df1296662a14a0de1389475f723f0498cf (patch) | |
tree | e8693db32d94da85630e99d41631f73f25914b53 | |
parent | 9476ee2de7a60c7576bb0242720098aa334a0a88 (diff) | |
download | libvfio-user-5ab273df1296662a14a0de1389475f723f0498cf.zip libvfio-user-5ab273df1296662a14a0de1389475f723f0498cf.tar.gz libvfio-user-5ab273df1296662a14a0de1389475f723f0498cf.tar.bz2 |
fix: wrong size for dirty page bitmap
Signed-off-by: William Henderson <william.henderson@nutanix.com>
-rw-r--r-- | lib/libvfio-user.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libvfio-user.c b/lib/libvfio-user.c index 6bc6623..f11cdfe 100644 --- a/lib/libvfio-user.c +++ b/lib/libvfio-user.c @@ -995,6 +995,7 @@ handle_device_feature(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg) ); msg->out.iov.iov_len = sizeof(struct vfio_user_device_feature) + + sizeof(struct vfio_user_device_feature_dma_logging_report) + bitmap_size; msg->out.iov.iov_base = malloc(msg->out.iov.iov_len); @@ -1003,7 +1004,8 @@ handle_device_feature(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg) } memcpy(msg->out.iov.iov_base, msg->in.iov.iov_base, - sizeof(struct vfio_user_device_feature)); + sizeof(struct vfio_user_device_feature) + + sizeof(struct vfio_user_device_feature_dma_logging_report)); struct vfio_user_device_feature *res = msg->out.iov.iov_base; |