Re: [PATCH 2/3] virtio: indirect ring

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rusty Russell
Date: Sunday, May 3, 2009 - 7:19 pm

On Mon, 27 Apr 2009 05:13:53 pm Dor Laor wrote:

OK, just so we track our mistakes.

1) virtio_rings must be physically contiguous, even though they actually
   have two independent parts.
2) The number of elements in a ring must be a power of 2.
3) virtio_pci tells the guest what number of elements to use.
4) The guest has to allocate that much physically contiguous memory, or fail.

In practice, 128 elements = 2 pages, 256 elements = 3 pages, 512 elements
= 5 pages.  Order 1, order 2, order 3 under Linux.  1 is OK, 2 is iffy, 3 is
hard.

Blocked from doing the simpler thing, we've decided to go with a layer
of indirection.  But the patch is simple and clean, so there's nothing
fundamental to object to.

I can't find 3/3, did it go missing?

Thanks,
Rusty.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/3] virtio: indirect ring , Rusty Russell, (Sun May 3, 7:19 pm)
[PATCH 3/3] lguest: add support for indirect ring entries, Mark McLoughlin, (Mon May 11, 10:11 am)