From 7dc0d72ab800c9d65d44cc3ba41f2bc3083c1d48 Mon Sep 17 00:00:00 2001 From: Timos Ampelikiotis Date: Tue, 21 Feb 2023 12:31:08 +0100 Subject: Update virtio-loopback-adapter Delta release: - Remove static build - Correct the configuration exchange Signed-off-by: Timos Ampelikiotis --- Makefile | 2 +- vhost_user_blk.c | 2 +- virtio_loopback.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3d5db06..33e75c0 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ all: $(BINS) $(BINS): $(OBJS) @echo -e "CC\t$@" - $(CC) $(CFLAGS) $(INCL) $^ -o $@ -lpthread -static + $(CC) $(CFLAGS) $(INCL) $^ -o $@ -lpthread %.o: %.c @echo -e "CC\t$@" diff --git a/vhost_user_blk.c b/vhost_user_blk.c index a8e4c13..bc79557 100644 --- a/vhost_user_blk.c +++ b/vhost_user_blk.c @@ -489,7 +489,7 @@ void vhost_user_blk_realize(int queue_num, int queue_size) vhost_user_blk_init(global_vdev); - global_vdev->vhublk->config_wce = 0; + global_vdev->vhublk->config_wce = 1; /* FIXME: We temporarily hardcoded the vrtqueues number */ global_vdev->vhublk->num_queues = queue_num; diff --git a/virtio_loopback.c b/virtio_loopback.c index 1e40136..0eaac50 100644 --- a/virtio_loopback.c +++ b/virtio_loopback.c @@ -1415,7 +1415,7 @@ uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr) k->get_config(vdev, vdev->config); - memcpy(&val, (uint16_t *)(vdev->config + addr), sizeof(uint64_t)); + memcpy(&val, (uint16_t *)(vdev->config + addr), sizeof(uint16_t)); return val; } -- cgit 1.2.3-korg