qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [virtio] qemu vs vhost virtqueue consumer


From: Greg Kurz
Subject: Re: [Qemu-devel] [virtio] qemu vs vhost virtqueue consumer
Date: Tue, 7 Apr 2015 10:51:17 +0200

On Tue, 7 Apr 2015 11:10:07 +0300
Catalin Vasile <address@hidden> wrote:

> I am using the virtio-net vhost-net model to make another virtio/vhost 
> solution.
> I can't seem to find how does one make a virtqueue to only be consumed
> by vhost when adding notifiers to vhost.
> virtio_add_queue() seems to always ask for a valid handle for qemu,
> and I don't see any disable function primitives called in either vhost
> or virtio part in qemu.
> I then thought the qemu part checks a flag every time a message
> appears, and it stops it from popping data from the virtqueue, but I
> don't see that either.
> How does the virtio/vhost-net solution make sure qemu doesn't consume
> data from a virtqueue destined for vhost?
> 

The idea behind vhost is we want to avoid QEMU to be involved when data
is being copied to/from the guest:  "adding notifiers to vhost" basically
means that MMIO will be redirected to vhost instead of QEMU. In other
words, QEMU cannot consume data because it is simply not notified at all
in this case.

Cheers.

--
Greg







reply via email to

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