* [Qemu-devel] virtio virt-queue and virt-ring
@ 2013-12-01 5:12 Yaodong Yang
2013-12-03 15:24 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Yaodong Yang @ 2013-12-01 5:12 UTC (permalink / raw)
To: qemu-devel, qemu-discuss; +Cc: Yaodong Yang
[-- Attachment #1: Type: text/plain, Size: 936 bytes --]
Inside file ./hw/virtio/virtio.c, The following structs are defined. I understood that for each virtual disk, there is a corresponding queue and this queue is implemented by a ring. My questions is what is the meaning of each element inside struct VRing?
Thanks a lot!
typedef struct VRing
{
unsigned int num;
hwaddr desc;
hwaddr avail;
hwaddr used;
} VRing;
struct VirtQueue
{
VRing vring;
hwaddr pa;
uint16_t last_avail_idx;
/* Last used index value we have signalled on */
uint16_t signalled_used;
/* Last used index value we have signalled on */
bool signalled_used_valid;
/* Notification enabled? */
bool notification;
uint16_t queue_index;
int inuse;
uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
VirtIODevice *vdev;
EventNotifier guest_notifier;
EventNotifier host_notifier;
};
[-- Attachment #2.1: Type: text/html, Size: 1520 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] virtio virt-queue and virt-ring
2013-12-01 5:12 [Qemu-devel] virtio virt-queue and virt-ring Yaodong Yang
@ 2013-12-03 15:24 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-12-03 15:24 UTC (permalink / raw)
To: Yaodong Yang; +Cc: qemu-devel, qemu-discuss
On Sun, Dec 01, 2013 at 05:12:52AM +0000, Yaodong Yang wrote:
> Inside file ./hw/virtio/virtio.c, The following structs are defined. I understood that for each virtual disk, there is a corresponding queue and this queue is implemented by a ring. My questions is what is the meaning of each element inside struct VRing?
Please see the virtio specification:
https://github.com/rustyrussell/virtio-spec
It defines the virtio-blk device.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-03 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-01 5:12 [Qemu-devel] virtio virt-queue and virt-ring Yaodong Yang
2013-12-03 15:24 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).