summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* caif_virtio: Remove bouncing email addressesSjur Brændeland2013-05-011-5/+5
| | | | | | | | | | | | | Remove our (soon to be) bouncing email addresses, and update Dmitri's address. Dmitry will take over as maintainer for CAIF from now on. Cc: Vikram Arv <vikram.arv@stericsson.com> Cc: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Dmity Tarnyagin <dmitry.tarnyagin@lockless.no>
* lguest: improve code readability in lg_cpu_start.Cosmin Paraschiv2013-04-301-3/+3
| | | | | | | | Make the container_of call friendlier and fix some comment slip-ups. Signed-off-by: Cosmin Paraschiv <csmnprschv@gmail.com> Cc: Daniel Baluta <dbaluta@ixiacom.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio-net: fill only rx queues which are being usedSasha Levin2013-04-291-5/+10
| | | | | | | | | | | | | | | | | | | | | Due to MQ support we may allocate a whole bunch of rx queues but never use them. With this patch we'll safe the space used by the receive buffers until they are actually in use: sh-4.2# free -h total used free shared buffers cached Mem: 490M 35M 455M 0B 0B 4.1M -/+ buffers/cache: 31M 459M Swap: 0B 0B 0B sh-4.2# ethtool -L eth0 combined 8 sh-4.2# free -h total used free shared buffers cached Mem: 490M 162M 327M 0B 0B 4.1M -/+ buffers/cache: 158M 331M Swap: 0B 0B 0B Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: map Switcher below fixmap.Rusty Russell2013-04-222-16/+5
| | | | | | | | | | | | Now we've adjusted all the code, we can simply set switcher_addr to wherever it needs to go below the fixmaps, rather than asserting that it should be so. With large NR_CPUS and PAE, people were hitting the "mapping switcher would thwack fixmap" message. Reported-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: cache last cpu we ran on.Rusty Russell2013-04-222-25/+54
| | | | | | This optimizes the frobbing of our Switcher map. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: map Switcher text whenever we allocate a new pagetable.Rusty Russell2013-04-222-10/+33
| | | | | | | | | It's always to same, so no need to put in the PTE every time we're about to run. Keep a flag to track whether the pagetable has the Switcher entries allocated, and when allocating always initialize the Switcher text PTE. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: don't share Switcher PTE pages between guests.Rusty Russell2013-04-223-166/+107
| | | | | | | | | | We currently use the whole top PGD entry for the switcher, so we simply share a fixed page of PTEs between all guests (actually, it's one per Host CPU, to ensure isolation between guests). Changes to a scheme where every guest has its own mappings. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: expost switcher_pages array (as lg_switcher_pages).Rusty Russell2013-04-222-12/+14
| | | | | | We will need this in page_table.c soon. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: extract shadow PTE walking / allocating.Rusty Russell2013-04-221-69/+101
| | | | | | | | | We want a separate find_pte() function so we can call it for populating the switcher PTE entries. We can also use it in page_writable(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: make check_gpte et. al return bool.Rusty Russell2013-04-221-10/+23
| | | | | | | | This is a bit neater: we can immediately return if a PTE/PGD/PMD entry is invalid (which also kills the guest). It means we don't risk using invalid entries as we reshuffle the code. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: assume Switcher text is a single page.Rusty Russell2013-04-225-23/+21
| | | | | | | | ie. SHARED_SWITCHER_PAGES == 1. It is well under a page, and it's a minor simplification: it's nice to have *one* simplification in a patch series! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: rename switcher_page to switcher_pages.Rusty Russell2013-04-223-19/+19
| | | | | | | There is a single page with the Switcher in it, but it's followed by 2 pages per Host CPU. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: remove RESERVE_MEM constant.Rusty Russell2013-04-221-7/+11
| | | | | | We can use switcher_addr directly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: check vaddr not pgd for Switcher protection.Rusty Russell2013-04-221-21/+16
| | | | | | | | We currently assume that the Switcher the top pgd; we want to remove this assumption, so check that vaddr is OK, rather then checking pgd index. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lguest: prepare to make SWITCHER_ADDR a variable.Rusty Russell2013-04-223-10/+14
| | | | | | | | We currently use the whole top PGD entry for the switcher, but that's hitting the fixmap in some configurations (mainly, large NR_CPUS). Introduce a variable, currently set to the constant. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio: console: replace EMFILE with EBUSY for already-open portAmit Shah2013-04-151-1/+1
| | | | | | | | | | | | | Returning EMFILE (process has too many open files) is incorrect to indicate a port is already open by another process. Use EBUSY for that. This does change what we report to userspace, but I believe userspace can look at it this way: it gets EBUSY, a new error code, instead of EMFILE. It's still an error, and that's not changing. Reported-by: Mateusz Guzik <mguzik@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio-scsi: reset virtqueue affinity when doing cpu hotplugWanlong Gao2013-04-081-0/+29
| | | | | | | | | | | Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-scsi@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: Asias He <asias@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio-scsi: introduce multiqueue supportPaolo Bonzini2013-04-081-28/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was idle, we can choose a queue arbitrarily. In this case the queue is chosen according to the current VCPU, so the driver expects the number of request queues to be equal to the number of VCPUs. This makes it easy and fast to select the queue, and also lets the driver optimize the IRQ affinity for the virtqueues (each virtqueue's affinity is set to the CPU that "owns" the queue). The speedup comes from improving cache locality and giving CPU affinity to the virtqueues, which is why this scheme was selected. Assuming that the thread that is sending requests to the device is I/O-bound, it is likely to be sleeping at the time the ISR is executed, and thus executing the ISR on the same processor that sent the requests is cheap. However, the kernel will not execute the ISR on the "best" processor unless you explicitly set the affinity. This is because in practice you will have many such I/O-bound processes and thus many otherwise idle processors. Then the kernel will execute the ISR on a random processor, rather than the one that is sending requests to the device. The alternative to per-CPU virtqueues is per-target virtqueues. To achieve the same locality, we could dynamically choose the virtqueue's affinity based on the CPU of the last task that sent a request. This is less appealing because we do not set the affinity directly---we only provide a hint to the irqbalanced running in userspace. Dynamically changing the affinity only works if the userspace applies the hint fast enough. Cc: linux-scsi@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: Asias He <asias@redhat.com> Tested-by: Venkatesh Srinivas <venkateshs@google.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio-scsi: push vq lock/unlock into virtscsi_vq_donePaolo Bonzini2013-04-081-13/+9
| | | | | | | | | | Avoid duplicated code in all of the callers. Cc: linux-scsi@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: Asias He <asias@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio-scsi: pass struct virtio_scsi to virtqueue completion functionPaolo Bonzini2013-04-081-8/+9
| | | | | | | | | | | This will be needed soon in order to retrieve the per-target struct. Cc: linux-scsi@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: Asias He <asias@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio-scsi: redo allocation of target dataWanlong Gao2013-04-081-46/+25
| | | | | | | | | | | | | | | | | | | | virtio_scsi_target_state is now empty. We will find new uses for it in the next few patches, so this patch does not drop it completely. And as James suggested, we use entries target_alloc and target_destroy in the host template to allocate and destroy the virtio_scsi_target_state of each target, attach this struct to scsi_target->hostdata. Now we can get at it from the sdev with scsi_target(sdev)->hostdata. No messing around with fixed size arrays and bulk memory allocation and no need to pass in the maximum target size as a parameter because everything should now happen dynamically. Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: Asias He <asias@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_console: make local symbols staticWei Yongjun2013-04-081-3/+3
| | | | | | | | Those symbols only used within this file, and should be static. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* caif_virtio: fix error return code in cfv_create_genpool()Wei Yongjun2013-04-021-1/+3
| | | | | | | | | Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* MAINTAINERS: add missing entries for virtioAmos Kong2013-04-021-0/+1
| | | | | | | | Some head files were split or moved to uapi/ without updating MAINTAINERS. Signed-off-by: Amos Kong <kongjianjun@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio: do not export "u16" and "u64" to userspacePaul Bolle2013-04-021-2/+2
| | | | | | | | virtio_balloon.h exports "u16" and "u64" to userspace. Use "__u16" and "__u64" instead. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* caif_virtio: Check that vringh_config is not nullSjur Brændeland2013-03-241-0/+4
| | | | | | | Check that vringh_config is not NULL before using it. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* caif_virtio: Use vringh_notify_enable correctlySjur Brændeland2013-03-241-1/+1
| | | | | | | | | Check on the correct return value from vringh_notify_enable_kern(). It returns false if more packets are available, not true. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tools/virtio: remove virtqueue_add_buf() from tests.Rusty Russell2013-03-203-20/+15
| | | | | | Make the rest of the paths use virtqueue_add_sgs or add_outbuf. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* 9p/trans_virtio.c: use virtio_add_sgs[]Rusty Russell2013-03-201-9/+39
| | | | | | | | virtio_add_buf() is going away, replaced with virtio_add_sgs() which takes multiple terminated scatterlists. Cc: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_balloon: use simplified virtqueue accessors.Rusty Russell2013-03-201-3/+3
| | | | | | We never add buffers with input and output parts, so use the new accessors. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_rpmsg_bus: use simplified virtqueue accessors.Rusty Russell2013-03-201-4/+4
| | | | | | | We never add buffers with input and output parts, so use the new accessors. Cc: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* caif_virtio: use simplified virtqueue accessors.Rusty Russell2013-03-201-2/+1
| | | | | | | We never add buffers with input and output parts, so use the new accessors. Cc: Sjur Brendeland <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_console: use simplified virtqueue accessors.Rusty Russell2013-03-201-3/+3
| | | | | | | We never add buffers with input and output parts, so use the new accessors. Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_rng: use simplified virtqueue accessors.Rusty Russell2013-03-201-1/+1
| | | | | | | We never add buffers with input and output parts, so use the new accessors. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Asias He <asias@redhat.com>
* virtio_net: use simplified virtqueue accessors.Rusty Russell2013-03-201-6/+5
| | | | | | | | We never add buffers with input and output parts, so use the new accessors. Cc: "Michael S. Tsirkin" <mst@redhat.com> Reviewed-by: Asias He <asias@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_net: use virtqueue_add_sgs[] for command buffers.Rusty Russell2013-03-201-25/+26
| | | | | | | | It's a bit cleaner to hand multiple sgs, rather than one big one. Cc: "Michael S. Tsirkin" <mst@redhat.com> Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_scsi: use virtqueue_add_inbuf() for virtscsi_kick_event.Rusty Russell2013-03-201-2/+2
| | | | | | | It's a bit clearer, and add_buf is going away. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Asias He <asias@redhat.com>
* virtio-scsi: use virtqueue_add_sgs for command buffersWanlong Gao2013-03-201-63/+37
| | | | | | | | | | | Using the new virtqueue_add_sgs function lets us simplify the queueing path. In particular, all data protected by the tgt_lock is just gone (multiqueue will find a new use for the lock). Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Asias He <asias@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_blk: remove nents member.Rusty Russell2013-03-201-11/+11
| | | | | | | | | It's simply a flag as to whether we have data now, so make it an explicit function parameter rather than a member of struct virtblk_req. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Asias He <asias@redhat.com>
* virtio-blk: use virtqueue_add_sgs on req pathPaolo Bonzini2013-03-201-36/+33
| | | | | | | | | | | | | | | | | (This is a respin of Paolo Bonzini's patch, but it calls virtqueue_add_sgs() instead of his multi-part API). This is similar to the previous patch, but a bit more radical because the bio and req paths now share the buffer construction code. Because the req path doesn't use vbr->sg, however, we need to add a couple of arguments to __virtblk_add_req. We also need to teach __virtblk_add_req how to build SCSI command requests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Asias He <asias@redhat.com>
* virtio-blk: use virtqueue_add_sgs on bio pathPaolo Bonzini2013-03-201-29/+29
| | | | | | | | | | | | | | | | | (This is a respin of Paolo Bonzini's patch, but it calls virtqueue_add_sgs() instead of his multi-part API). Move the creation of the request header and response footer to __virtblk_add_req. vbr->sg only contains the data scatterlist, the header/footer are added separately using virtqueue_add_sgs(). With this change, virtio-blk (with use_bio) is not relying anymore on the virtio functions ignoring the end markers in a scatterlist. The next patch will do the same for the other path. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Asias He <asias@redhat.com>
* virtio-blk: reorganize virtblk_add_reqPaolo Bonzini2013-03-201-35/+20
| | | | | | | | | | | Right now, both virtblk_add_req and virtblk_add_req_wait call virtqueue_add_buf. To prepare for the next patches, abstract the call to virtqueue_add_buf into a new function __virtblk_add_req, and include the waiting logic directly in virtblk_add_req. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Asias He <asias@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tools/virtio: make vringh_test use inbuf/outbuf.Rusty Russell2013-03-202-4/+14
| | | | | | | | | | | | | | | | | | | | As expected, the simplified accessors are faster. for i in `seq 50`; do /usr/bin/time -f 'Wall time:%e' ./vringh_test --indirect --eventidx --parallel --fast-vringh; done 2>&1 | stats --trim-outliers: Before: Using CPUS 0 and 3 Guest: notified 0, pinged 39062-39063(39063) Host: notified 39062-39063(39063), pinged 0 Wall time:1.760000-2.220000(1.789167) After: Using CPUS 0 and 3 Guest: notified 0, pinged 39037-39063(39062) Host: notified 39037-39063(39062), pinged 0 Wall time:1.640000-1.810000(1.676875) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_ring: virtqueue_add_outbuf / virtqueue_add_inbuf.Rusty Russell2013-03-202-0/+54
| | | | | | | | | | These are specialized versions of virtqueue_add_buf(), which cover over 80% of cases and are far clearer. In particular, the scatterlists passed to these functions don't have to be clean (ie. we ignore end markers). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio_ring: virtqueue_add_sgs, to add multiple sgs.Rusty Russell2013-03-204-63/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | virtio_scsi can really use this, to avoid the current hack of copying the whole sg array. Some other things get slightly neater, too. This causes a slowdown in virtqueue_add_buf(), which is implemented as a wrapper. This is addressed in the next patches. for i in `seq 50`; do /usr/bin/time -f 'Wall time:%e' ./vringh_test --indirect --eventidx --parallel --fast-vringh; done 2>&1 | stats --trim-outliers: Before: Using CPUS 0 and 3 Guest: notified 0, pinged 39009-39063(39062) Host: notified 39009-39063(39062), pinged 0 Wall time:1.700000-1.950000(1.723542) After: Using CPUS 0 and 3 Guest: notified 0, pinged 39062-39063(39063) Host: notified 39062-39063(39063), pinged 0 Wall time:1.760000-2.220000(1.789167) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: Asias He <asias@redhat.com>
* scatterlist: introduce sg_unmark_endPaolo Bonzini2013-03-203-2/+18
| | | | | | | | | | This is useful in places that recycle the same scatterlist multiple times, and do not want to incur the cost of sg_init_table every time in hot paths. Acked-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* caif_virtio: Introduce caif over virtioErwan Yvin2013-03-205-0/+827
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the CAIF Virtio shared memory driver for talking to a modem. This CAIF Link layer communicates to the modem over shared memory. It is implemented as a virtio_driver. The underlying virtio device is managed by the remoteproc framework. The Virtio queue is used for transmitting data to the modem, and the new vringh is used for receiving data. Genalloc is used for managing the shared memory used for TX data. The default dma-alloc-coherent allocator can only allocate whole pages, and this wastes too much shared memory. Flow control is implemented by stopping the TX-queues if the virtio queues go full or we run out of memory. Queued are reopened when queues are below the watermark. NAPI is used in RX path, and a dedicated tasklet is used for releasing TX buffers. Signed-off-by: Erwan Yvin <erwan.yvin@stericsson.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (minor fixes)
* virtio: Introduce vringh wrappers in virtio_configSjur Brændeland2013-03-202-0/+32
| | | | | | | | | | | | | | | | | | | Add wrappers for the host vrings to support loose coupling between the virtio device and driver. A new struct vringh_config_ops with the functions find_vrhs() and del_vrhs() is added to the virtio_device struct. This enables virtio drivers to manage virtio host rings without detailed knowledge of how the vrings are created and deleted. The function vringh_notify() is added so vringh clients can notify the other side that buffers are added to the used-ring. Cc: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (constified vringh_config)
* tools/virtio: add vring_test.Rusty Russell2013-03-203-4/+747
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mainly to test the drivers/vhost/vringh.c code, but it also uses the drivers/virtio/virtio_ring.c code for the guest side. Usage for testing the basic implementation: ./vringh_test # Test with indirect descriptors ./vringh_test --indirect # Test with indirect descriptors and event indexex ./vringh_test --indirect --eventidx You can run a parallel stress test by adding --parallel to any of the above options. eg ./vringh_test --parallel: Using CPUS 0 and 3 Guest: notified 10107974, pinged 107970 Host: notified 108158, pinged 3172148 ./vringh_test --indirect --eventidx --parallel: Using CPUS 0 and 3 Guest: notified 156357, pinged 156251 Host: notified 156251, pinged 78179 Average of 50 times doing ./vringh_test --indirect --eventidx --parallel: 2.840000-3.040000(2.927292)user Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* vringh: host-side implementation of virtio rings.Rusty Russell2013-03-206-1/+1215
| | | | | | | | | | | | Getting use of virtio rings correct is tricky, and a recent patch saw an implementation of in-kernel rings (as separate from userspace). This abstracts the business of dealing with the virtio ring layout from the access (userspace or direct); to do this, we use function pointers, which gcc inlines correctly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud