Thread (1 message) 1 message, 1 author, 2012-03-25
  • (off-list ancestor, not in this archive)
  • Re: vhost question · Stefan Hajnoczi <hidden> · 2012-03-25

Re: vhost question

From: Stefan Hajnoczi <hidden>
Date: 2012-03-25 16:18:30

On Sun, Mar 25, 2012 at 1:29 PM, Steve Glass [off-list ref] wrote:
On 22 March 2012 19:52, Stefan Hajnoczi [off-list ref] wrote:
quoted

Can you queue a tx->rx kick on the vhost work queue with
vhost_work_queue()?

Stefan

I've been looking at this and trying to work out how to achieve that. I can
see how I can enqueue some work on the vhost queue but the rx_handler needs
to run in the process context of the receiving VM (or else it can't access
the ring). I don't think that's true of the work queue (doesn't it run with
the qemu process context?)
The vhost worker thread has the mm of the process, see use_mm(dev->mm)
in drivers/vhost/vhost.c:vhost_worker().  It sounds like you need
vhost worker A (tx) to schedule work for vhost worker B (rx).

Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help