qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vasile Catalin-B50542 <catalin.vasile@freescale.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [virtio] virtqueue allocation and thread-safety
Date: Wed, 14 Jan 2015 14:01:15 +0200	[thread overview]
Message-ID: <54B65A8B.3000801@freescale.com> (raw)

Hi,

I'm trying to make a new virtio device.
I got it running (I made a functional dummy device & guest driver).
Now I'm trying to build some communication between the device and guest 
driver.
I can't seem to find where the actual allocation of virtqueues are made.
I've looked inside virtio_init(), but it just allocates the vq 
structures and I don't see
any pointers inside that structure that might give and idea of something 
dynamically
allocated. There is a member of that structure named "vector", but it's 
type is uint16_t.
I've also looked inside the virtio_add_queue(), and it just makes some 
constant assignments.
Where are the vqs buffer space actually allocated?
One more thing. Are the virtqueue functions thread safe, from both point 
of views
(qemu and guest driver API's view)?
Also I don't see any dynamic allocations/freeing when pushing and 
popping, either.

Cătă

             reply	other threads:[~2015-01-14 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 12:01 Vasile Catalin-B50542 [this message]
2015-01-15  1:41 ` [Qemu-devel] [virtio] virtqueue allocation and thread-safety Fam Zheng
2015-01-16  9:15   ` Vasile Catalin-B50542

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B65A8B.3000801@freescale.com \
    --to=catalin.vasile@freescale.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).