qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qemu virtIO blocking operation - question


From: Sinha, Ani
Subject: Re: [Qemu-devel] qemu virtIO blocking operation - question
Date: Mon, 12 Sep 2011 13:31:57 -0500

On Sep 11, 2011, at 6:34 AM, Stefan Hajnoczi wrote:

> On Fri, Sep 09, 2011 at 07:45:17PM -0500, Sinha, Ani wrote:
>> So I am writing a virtIO driver for a device that supports blocking calls 
>> like poll() etc. Now the front end paravirtualized driver mirrors the 
>> request to the backend "host" qemu process that then does the actual call on 
>> the host kernel on behalf of the guest. Now my question is, when I do a 
>> blocking call from within the callback that I have registered when I created 
>> the virtqueue, does it block the entire vcpu? If it does, do I have to 
>> create an async context for it? Looking at virtio-net and virtio-block, I 
>> can see the concept of bottom halves but I am not sure if this helps me in 
>> any way.
>
> What device are you adding?  It would help to share what you are trying
> to accomplish.


We are trying to paravirtualize the IPMI device (/dev/ipmi0).


>
> QEMU has an event loop where you can register non-blocking file
> descriptors.  Callback functions that are invoked when the file
> descriptor becomes readable/writable.  This is how block I/O,
> networking, VNC UI, monitor, etc work and probably what you should do
> too.


Hmm, I looked closely at virtio-block driver. It looks like it built on top of 
posix aio infrastructure (posix-aio-compat.c). I'll probably have to build 
something similar or use the event loop you suggested.


>
> You may find these posts I wrote helpful, they explain vcpu threads and
> the I/O thread:
> http://blog.vmsplice.net/2011/03/qemu-internals-big-picture-overview.html
> http://blog.vmsplice.net/2011/03/qemu-internals-overall-architecture-and.html


Thanks a lot. I will look into these articles.

Cheers,
ani



============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================




reply via email to

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