RFC Virtio draft II
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 28 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | Virtio draft III: virtio.hinclude/ | +115 | 1 reply | |
| 2/3 | Virtio draft II: example block driverdrivers/ drivers/ include/ | +328 | 5 replies | |
| 2/3 | Virtio draft III: example net driverdrivers/ drivers/ include/ | +290 | 15 replies | |
| 3/3 | Virtio draft II: example net driverdrivers/ drivers/ include/ | +256 | 0 replies | |
| 3/3 | Virtio draft III: example block driverdrivers/ drivers/ include/ +1 more | +424 | 14 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH RFC 0/3] Virtio draft II
Hi again all,
It turns out that networking really wants ordered requests, which the
previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi.
The downside is that locking is more complicated, and after a few dead
ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get called.
Core changes:
1) struct virtio_device has a "lock" and "priv" fields (the latter for the driver to use, esp from callbacks).
2) add_outbuf and add_inbuf take a cb function ptr and void *, rather than a used pointer.
3) lengths of buffers must now fit in an unsigned int, not long.
4) the virtio_sync wrapper is gone.
Block driver changes (+30 lines)
1) Convert to callbacks not interrupt.
2) Ensure both outbuf & inbuf have been used up before finishing request. This avoids potential remote access to freed memory.
Net driver changes (+6 lines)
1) Convert to callbacks.
2) Store id in skb->cb, not array.
3) Remove NET_BUFS limit: we queue packets until virtio chokes.
4) Locking should now be correct, thanks mainly to virtio changes.
BTW, the lguest implementations (very rough) are in the lguest patch repo for your viewing pleasure:
Implementation over dumb read/write interface:
http://lguest.ozlabs.org/patches/?file/tip/new-io-lguest-readwrite.patch
Implementation using descriptors (assuming host can access guest mem):
http://lguest.ozlabs.org/patches/?file/tip/new-io-lguest-desc.patch
Cheers,
Rusty.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/