qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH for 8.0 05/13] virtio: Specify uint32_t as VirtQueueElementOl


From: Eugenio Pérez
Subject: [RFC PATCH for 8.0 05/13] virtio: Specify uint32_t as VirtQueueElementOld members type
Date: Mon, 5 Dec 2022 18:04:28 +0100

This struct will be the one used as a base to serialize and deserialize
the virtqueue elements within this RFC. The VMState fields are way more
simpler using this struct.

TODO: Use VirtQueueElement to serialize and deserialize inflight
elements.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 hw/virtio/virtio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index eb6347ab5d..6efff3d441 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -2288,9 +2288,9 @@ unsigned int virtqueue_drop_all(VirtQueue *vq)
  * used before the change.
  */
 typedef struct VirtQueueElementOld {
-    unsigned int index;
-    unsigned int out_num;
-    unsigned int in_num;
+    uint32_t index;
+    uint32_t out_num;
+    uint32_t in_num;
     hwaddr in_addr[VIRTQUEUE_MAX_SIZE];
     hwaddr out_addr[VIRTQUEUE_MAX_SIZE];
     struct iovec in_sg[VIRTQUEUE_MAX_SIZE];
-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]