aboutsummaryrefslogtreecommitdiffstats
path: root/virtio_input.c
diff options
context:
space:
mode:
authorTimos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>2022-11-25 13:39:49 +0100
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-03 15:18:54 +0300
commite6d6621bced8b62dc9f98a09870b527535cbb158 (patch)
treea0779840e12602ad199e4ee45a7976e89e39b129 /virtio_input.c
parenta3fcee5911bf760f9f4522e94cb9e6ab22a7eb95 (diff)
Virtio-loopback-adapter Beta version:
- Build a single virtio-loopback-adapter binary - Mmap the vrings with dynamic defined size - Add set_mem_table mechanism (Not used into this release) Signed-off-by: Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>
Diffstat (limited to 'virtio_input.c')
-rw-r--r--virtio_input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/virtio_input.c b/virtio_input.c
index 793806c..18ef3d4 100644
--- a/virtio_input.c
+++ b/virtio_input.c
@@ -175,6 +175,8 @@ static void virtio_input_set_status(VirtIODevice *vdev, uint8_t val)
VirtIOInput *vinput = vdev->vinput;
bool should_start = virtio_device_started(vdev, val);
+ DBG("virtio_input_set_status(...): %u\n", val);
+
if (should_start) {
if (!vinput->active) {
vinput->active = true;
@@ -252,7 +254,7 @@ void virtio_input_device_realize()
/* FIXME: do we need that? */
memcpy(global_vdev->vq, vinput->evt, sizeof(VirtQueue));
- memcpy(global_vdev->vq, vinput->sts, sizeof(VirtQueue));
+ memcpy(&global_vdev->vq[1], vinput->sts, sizeof(VirtQueue));
DBG("global_vdev->guest_features: 0x%lx\n", global_vdev->guest_features);
}