01 May, 2016

1 commit

  • Smatch complains that we might not initialize "queue". The issue is
    callers like setup_vq() from virtio_pci_modern.c where "num" could be
    something like 2 and "vring_align" is 64. In that case, vring_size() is
    less than PAGE_SIZE. It won't happen in real life, but we're getting
    the value of "num" from a register so it's not really possible to tell
    what value it holds with static analysis.

    Let's just silence the warning.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Michael S. Tsirkin

    Dan Carpenter
     

02 Mar, 2016

4 commits

  • Signed-off-by: Andy Lutomirski
    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: David Vrabel
    Reviewed-by: Wei Liu

    Andy Lutomirski
     
  • This leaves vring_new_virtqueue alone for compatbility, but it
    adds two new improved APIs:

    vring_create_virtqueue: Creates a virtqueue backed by automatically
    allocated coherent memory. (Some day it this could be extended to
    support non-coherent memory, too, if there ends up being a platform
    on which it's worthwhile.)

    __vring_new_virtqueue: Creates a virtqueue with a manually-specified
    layout. This should allow mic_virtio to work much more cleanly.

    Signed-off-by: Andy Lutomirski
    Signed-off-by: Michael S. Tsirkin

    Andy Lutomirski
     
  • virtio_ring currently sends the device (usually a hypervisor)
    physical addresses of its I/O buffers. This is okay when DMA
    addresses and physical addresses are the same thing, but this isn't
    always the case. For example, this never works on Xen guests, and
    it is likely to fail if a physical "virtio" device ever ends up
    behind an IOMMU or swiotlb.

    The immediate use case for me is to enable virtio on Xen guests.
    For that to work, we need vring to support DMA address translation
    as well as a corresponding change to virtio_pci or to another
    driver.

    Signed-off-by: Andy Lutomirski
    Signed-off-by: Michael S. Tsirkin

    Andy Lutomirski
     
  • This is a kludge, but no one has come up with a a better idea yet.
    We'll introduce DMA API support guarded by vring_use_dma_api().
    Eventually we may be able to return true on more and more systems,
    and hopefully we can get rid of vring_use_dma_api() entirely some
    day.

    Signed-off-by: Andy Lutomirski
    Signed-off-by: Michael S. Tsirkin

    Andy Lutomirski
     

13 Jan, 2016

1 commit

  • We need a full barrier after writing out event index, using
    virt_store_mb there seems better than open-coding. As usual, we need a
    wrapper to account for strong barriers.

    It's tempting to use this in vhost as well, for that, we'll
    need a variant of smp_store_mb that works on __user pointers.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Peter Zijlstra (Intel)

    Michael S. Tsirkin
     

07 Dec, 2015

2 commits

  • Improves cacheline transfer flow of available ring header.

    Virtqueues are implemented as a pair of rings, one producer->consumer
    avail ring and one consumer->producer used ring; preceding the
    avail ring in memory are two contiguous u16 fields -- avail->flags
    and avail->idx. A producer posts work by writing to avail->idx and
    a consumer reads avail->idx.

    The flags and idx fields only need to be written by a producer CPU
    and only read by a consumer CPU; when the producer and consumer are
    running on different CPUs and the virtio_ring code is structured to
    only have source writes/sink reads, we can continuously transfer the
    avail header cacheline between 'M' states between cores. This flow
    optimizes core -> core bandwidth on certain CPUs.

    (see: "Software Optimization Guide for AMD Family 15h Processors",
    Section 11.6; similar language appears in the 10h guide and should
    apply to CPUs w/ exclusive caches, using LLC as a transfer cache)

    Unfortunately the existing virtio_ring code issued reads to the
    avail->idx and read-modify-writes to avail->flags on the producer.

    This change shadows the flags and index fields in producer memory;
    the vring code now reads from the shadows and only ever writes to
    avail->flags and avail->idx, allowing the cacheline to transfer
    core -> core optimally.

    In a concurrent version of vring_bench, the time required for
    10,000,000 buffer checkout/returns was reduced by ~2% (average
    across many runs) on an AMD Piledriver (15h) CPU:

    (w/o shadowing):
    Performance counter stats for './vring_bench':
    5,451,082,016 L1-dcache-loads
    ...
    2.221477739 seconds time elapsed

    (w/ shadowing):
    Performance counter stats for './vring_bench':
    5,405,701,361 L1-dcache-loads
    ...
    2.168405376 seconds time elapsed

    The further away (in a NUMA sense) virtio producers and consumers are
    from each other, the more we expect to benefit. Physical implementations
    of virtio devices and implementations of virtio where the consumer polls
    vring avail indexes (vhost) should also benefit.

    Signed-off-by: Venkatesh Srinivas
    Signed-off-by: Michael S. Tsirkin

    Venkatesh Srinivas
     
  • b92b1b89a33c ("virtio: force vring descriptors to be allocated from
    lowmem") tried to exclude highmem pages for descriptors so it cleared
    __GFP_HIGHMEM from a given gfp mask. The patch also cleared __GFP_HIGH
    which doesn't make much sense for this fix because __GFP_HIGH only
    controls access to memory reserves and it doesn't have any influence
    on the zone selection. Some of the call paths use GFP_ATOMIC and
    dropping __GFP_HIGH will reduce their changes for success because the
    lack of access to memory reserves.

    Signed-off-by: Michal Hocko
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Will Deacon
    Reviewed-by: Mel Gorman

    Michal Hocko
     

11 Feb, 2015

1 commit

  • The virtqueue_add() calls START_USE() upon entry. The virtqueue_kick() is
    called if vq->num_added == (1 << 16) - 1 before calling END_USE().
    The virtqueue_kick_prepare() called via virtqueue_kick() calls START_USE()
    upon entry, and will call panic() if DEBUG is enabled.
    Move this virtqueue_kick() call to after END_USE() call.

    Signed-off-by: Tetsuo Handa
    Signed-off-by: Rusty Russell

    Tetsuo Handa
     

21 Jan, 2015

1 commit


09 Dec, 2014

4 commits

  • Activate VIRTIO_F_VERSION_1 automatically unless legacy_only
    is set.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • For virtio-1, we can theoretically have a more complex virtqueue
    layout with avail and used buffers not on a contiguous memory area
    with the descriptor table. For now, it's fine for a transport driver
    to stay with the old layout: It needs, however, a way to access
    the locations of the avail/used rings so it can register them with
    the host.

    Reviewed-by: David Hildenbrand
    Signed-off-by: Cornelia Huck

    Signed-off-by: Michael S. Tsirkin

    Cornelia Huck
     
  • Use virtioXX_to_cpu and friends for access to
    all multibyte structures in memory.

    Note: this is intentionally mechanical.
    A follow-up patch will split long lines etc.

    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Cornelia Huck

    Michael S. Tsirkin
     
  • It seemed like a good idea to use bitmap for features
    in struct virtio_device, but it's actually a pain,
    and seems to become even more painful when we get more
    than 32 feature bits. Just change it to a u32 for now.

    Based on patch by Rusty.

    Suggested-by: David Hildenbrand
    Signed-off-by: Rusty Russell
    Signed-off-by: Cornelia Huck
    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Cornelia Huck

    Michael S. Tsirkin
     

14 Sep, 2014

2 commits

  • virtqueue_add() populates the virtqueue descriptor table from the sgs
    given. If it uses an indirect descriptor table, then it puts a single
    descriptor in the descriptor table pointing to the kmalloc'ed indirect
    table where the sg is populated.

    Previously vring_add_indirect() did the allocation and the simple
    linear layout. We replace that with alloc_indirect() which allocates
    the indirect table then chains it like the normal descriptor table so
    we can reuse the core logic.

    This slows down pktgen by less than 1/2 a percent (which uses direct
    descriptors), as well as vring_bench, but it's far neater.

    vring_bench before:
    1061485790-1104800648(1.08254e+09+/-6.6e+06)ns
    vring_bench after:
    1125610268-1183528965(1.14172e+09+/-8e+06)ns

    pktgen before:
    787781-796334(793165+/-2.4e+03)pps 365-369(367.5+/-1.2)Mb/sec (365530384-369498976(3.68028e+08+/-1.1e+06)bps) errors: 0

    pktgen after:
    779988-790404(786391+/-2.5e+03)pps 361-366(364.35+/-1.3)Mb/sec (361914432-366747456(3.64885e+08+/-1.2e+06)bps) errors: 0

    Now, if we make force indirect descriptors by turning off any_header_sg
    in virtio_net.c:

    pktgen before:
    713773-721062(718374+/-2.1e+03)pps 331-334(332.95+/-0.92)Mb/sec (331190672-334572768(3.33325e+08+/-9.6e+05)bps) errors: 0
    pktgen after:
    710542-719195(714898+/-2.4e+03)pps 329-333(331.15+/-1.1)Mb/sec (329691488-333706480(3.31713e+08+/-1.1e+06)bps) errors: 0

    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Rusty Russell
     
  • We used to have several callers which just used arrays. They're
    gone, so we can use sg_next() everywhere, simplifying the code.

    On my laptop, this slowed down vring_bench by 15%:

    vring_bench before:
    936153354-967745359(9.44739e+08+/-6.1e+06)ns
    vring_bench after:
    1061485790-1104800648(1.08254e+09+/-6.6e+06)ns

    However, a more realistic test using pktgen on a AMD FX(tm)-8320 saw
    a few percent improvement:

    pktgen before:
    767390-792966(785159+/-6.5e+03)pps 356-367(363.75+/-2.9)Mb/sec (356068960-367936224(3.64314e+08+/-3e+06)bps) errors: 0

    pktgen after:
    787781-796334(793165+/-2.4e+03)pps 365-369(367.5+/-1.2)Mb/sec (365530384-369498976(3.68028e+08+/-1.1e+06)bps) errors: 0

    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Rusty Russell
     

28 Apr, 2014

1 commit


13 Mar, 2014

2 commits

  • Heinz points out that adding buffers to a broken virtqueue (which
    should "never happen") still works. Failing allows drivers to detect
    and complain about broken devices.

    Now drivers are robust, we can add this extra check.

    Reported-by: Heinz Graalfs
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • In commit bb478d8b167 virtio_ring: plug kmemleak false positive,
    kmemleak_ignore was introduced. This broke compilation of virtio_test:

    cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
    -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD
    -U_FORTIFY_SOURCE -c -o virtio_ring.o ../../drivers/virtio/virtio_ring.c
    ../../drivers/virtio/virtio_ring.c: In function ‘vring_add_indirect’:
    ../../drivers/virtio/virtio_ring.c:177:2: warning: implicit declaration
    of function ‘kmemleak_ignore’ [-Wimplicit-function-declaration]
    kmemleak_ignore(desc);
    ^
    cc virtio_test.o virtio_ring.o -o virtio_test
    virtio_ring.o: In function `vring_add_indirect':
    tools/virtio/../../drivers/virtio/virtio_ring.c:177:
    undefined reference to `kmemleak_ignore'

    Add a dummy header for tools/virtio, and add #incldue
    to drivers/virtio/virtio_ring.c so it is picked up by the userspace
    tools.

    Signed-off-by: Joel Stanley
    Signed-off-by: Rusty Russell

    Joel Stanley
     

05 Nov, 2013

1 commit


29 Oct, 2013

3 commits

  • Add new function virtqueue_is_broken(). Callers of virtqueue_get_buf()
    should check for a broken queue.

    Signed-off-by: Heinz Graalfs
    Signed-off-by: Rusty Russell

    Heinz Graalfs
     
  • virtqueue_{kick()/notify()} should exploit the new host notification API.
    If the notify call returned with a negative value the host kick failed
    (e.g. a kick triggered after a device was hot-unplugged). In this case
    the virtqueue is set to 'broken' and false is returned, otherwise true.

    Signed-off-by: Heinz Graalfs
    Signed-off-by: Rusty Russell

    Heinz Graalfs
     
  • Currently a host kick error is silently ignored and not reflected in
    the virtqueue of a particular virtio device.

    Changing the notify API for guest->host notification seems to be one
    prerequisite in order to be able to handle such errors in the context
    where the kick is triggered.

    This patch changes the notify API. The notify function must return a
    bool return value. It returns false if the host notification failed.

    Signed-off-by: Heinz Graalfs
    Signed-off-by: Rusty Russell

    Heinz Graalfs
     

17 Oct, 2013

1 commit

  • unreferenced object 0xffff88003d467e20 (size 32):
    comm "softirq", pid 0, jiffies 4295197765 (age 6.364s)
    hex dump (first 32 bytes):
    28 19 bf 3d 00 00 00 00 0c 00 00 00 01 00 01 00 (..=............
    02 dc 51 3c 00 00 00 00 56 00 00 00 00 00 00 00 ..Q] kmemleak_alloc+0x59/0xc0
    [] __kmalloc+0xf3/0x180
    [] vring_add_indirect+0x36/0x280
    [] virtqueue_add_outbuf+0xbf/0x4e0
    [] start_xmit+0x1a0/0x3b0
    [] dev_hard_start_xmit+0x2d1/0x4d0
    [] sch_direct_xmit+0xf2/0x1c0
    [] dev_queue_xmit+0x1c8/0x460
    [] ip6_finish_output2+0x1d7/0x470
    [] ip6_finish_output+0x90/0xb0
    [] ip6_output+0x37/0xb0
    [] igmp6_send+0x2db/0x470
    [] igmp6_timer_handler+0x95/0xa0
    [] call_timer_fn+0x2c/0x90
    [] run_timer_softirq+0x1da/0x1f0
    [] __do_softirq+0xd1/0x1b0

    Address gets embedded in a descriptor via virt_to_phys(). See detach_buf,
    which frees it:

    if (vq->vring.desc[i].flags & VRING_DESC_F_INDIRECT)
    kfree(phys_to_virt(vq->vring.desc[i].addr));

    Reported-by: Christoph Paasch
    Fix-suggested-by: Christoph Paasch
    Typing-done-by: Rusty Russell
    Signed-off-by: Rusty Russell

    Rusty Russell
     

10 Jul, 2013

2 commits

  • Pull networking updates from David Miller:
    "This is a re-do of the net-next pull request for the current merge
    window. The only difference from the one I made the other day is that
    this has Eliezer's interface renames and the timeout handling changes
    made based upon your feedback, as well as a few bug fixes that have
    trickeled in.

    Highlights:

    1) Low latency device polling, eliminating the cost of interrupt
    handling and context switches. Allows direct polling of a network
    device from socket operations, such as recvmsg() and poll().

    Currently ixgbe, mlx4, and bnx2x support this feature.

    Full high level description, performance numbers, and design in
    commit 0a4db187a999 ("Merge branch 'll_poll'")

    From Eliezer Tamir.

    2) With the routing cache removed, ip_check_mc_rcu() gets exercised
    more than ever before in the case where we have lots of multicast
    addresses. Use a hash table instead of a simple linked list, from
    Eric Dumazet.

    3) Add driver for Atheros CQA98xx 802.11ac wireless devices, from
    Bartosz Markowski, Janusz Dziedzic, Kalle Valo, Marek Kwaczynski,
    Marek Puzyniak, Michal Kazior, and Sujith Manoharan.

    4) Support reporting the TUN device persist flag to userspace, from
    Pavel Emelyanov.

    5) Allow controlling network device VF link state using netlink, from
    Rony Efraim.

    6) Support GRE tunneling in openvswitch, from Pravin B Shelar.

    7) Adjust SOCK_MIN_RCVBUF and SOCK_MIN_SNDBUF for modern times, from
    Daniel Borkmann and Eric Dumazet.

    8) Allow controlling of TCP quickack behavior on a per-route basis,
    from Cong Wang.

    9) Several bug fixes and improvements to vxlan from Stephen
    Hemminger, Pravin B Shelar, and Mike Rapoport. In particular,
    support receiving on multiple UDP ports.

    10) Major cleanups, particular in the area of debugging and cookie
    lifetime handline, to the SCTP protocol code. From Daniel
    Borkmann.

    11) Allow packets to cross network namespaces when traversing tunnel
    devices. From Nicolas Dichtel.

    12) Allow monitoring netlink traffic via AF_PACKET sockets, in a
    manner akin to how we monitor real network traffic via ptype_all.
    From Daniel Borkmann.

    13) Several bug fixes and improvements for the new alx device driver,
    from Johannes Berg.

    14) Fix scalability issues in the netem packet scheduler's time queue,
    by using an rbtree. From Eric Dumazet.

    15) Several bug fixes in TCP loss recovery handling, from Yuchung
    Cheng.

    16) Add support for GSO segmentation of MPLS packets, from Simon
    Horman.

    17) Make network notifiers have a real data type for the opaque
    pointer that's passed into them. Use this to properly handle
    network device flag changes in arp_netdev_event(). From Jiri
    Pirko and Timo Teräs.

    18) Convert several drivers over to module_pci_driver(), from Peter
    Huewe.

    19) tcp_fixup_rcvbuf() can loop 500 times over loopback, just use a
    O(1) calculation instead. From Eric Dumazet.

    20) Support setting of explicit tunnel peer addresses in ipv6, just
    like ipv4. From Nicolas Dichtel.

    21) Protect x86 BPF JIT against spraying attacks, from Eric Dumazet.

    22) Prevent a single high rate flow from overruning an individual cpu
    during RX packet processing via selective flow shedding. From
    Willem de Bruijn.

    23) Don't use spinlocks in TCP md5 signing fast paths, from Eric
    Dumazet.

    24) Don't just drop GSO packets which are above the TBF scheduler's
    burst limit, chop them up so they are in-bounds instead. Also
    from Eric Dumazet.

    25) VLAN offloads are missed when configured on top of a bridge, fix
    from Vlad Yasevich.

    26) Support IPV6 in ping sockets. From Lorenzo Colitti.

    27) Receive flow steering targets should be updated at poll() time
    too, from David Majnemer.

    28) Fix several corner case regressions in PMTU/redirect handling due
    to the routing cache removal, from Timo Teräs.

    29) We have to be mindful of ipv4 mapped ipv6 sockets in
    upd_v6_push_pending_frames(). From Hannes Frederic Sowa.

    30) Fix L2TP sequence number handling bugs, from James Chapman."

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1214 commits)
    drivers/net: caif: fix wrong rtnl_is_locked() usage
    drivers/net: enic: release rtnl_lock on error-path
    vhost-net: fix use-after-free in vhost_net_flush
    net: mv643xx_eth: do not use port number as platform device id
    net: sctp: confirm route during forward progress
    virtio_net: fix race in RX VQ processing
    virtio: support unlocked queue poll
    net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bit
    Documentation: Fix references to defunct linux-net@vger.kernel.org
    net/fs: change busy poll time accounting
    net: rename low latency sockets functions to busy poll
    bridge: fix some kernel warning in multicast timer
    sfc: Fix memory leak when discarding scattered packets
    sit: fix tunnel update via netlink
    dt:net:stmmac: Add dt specific phy reset callback support.
    dt:net:stmmac: Add support to dwmac version 3.610 and 3.710
    dt:net:stmmac: Allocate platform data only if its NULL.
    net:stmmac: fix memleak in the open method
    ipv6: rt6_check_neigh should successfully verify neigh if no NUD information are available
    net: ipv6: fix wrong ping_v6_sendmsg return value
    ...

    Linus Torvalds
     
  • This adds a way to check ring empty state after enable_cb outside any
    locks. Will be used by virtio_net.

    Note: there's room for more optimization: caller is likely to have a
    memory barrier already, which means we might be able to get rid of a
    barrier here. Deferring this optimization until we do some
    benchmarking.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     

20 May, 2013

1 commit


20 Mar, 2013

3 commits

  • 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 Russell
     
  • 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
    Reviewed-by: Wanlong Gao
    Reviewed-by: Asias He

    Rusty Russell
     
  • The host side of ring needs this logic too.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

18 Dec, 2012

2 commits


22 Oct, 2012

1 commit

  • Virtio devices may attempt to add descriptors to a virtqueue from atomic
    context using GFP_ATOMIC allocation. This is problematic because such
    allocations can fall outside of the lowmem mapping, causing virt_to_phys
    to report bogus physical addresses which are subsequently passed to
    userspace via the buffers for the virtual device.

    This patch masks out __GFP_HIGH and __GFP_HIGHMEM from the requested
    flags when allocating descriptors for a virtqueue. If an atomic
    allocation is requested and later fails, we will return -ENOSPC which
    will be handled by the driver.

    Cc: stable@kernel.org
    Cc: Sasha Levin
    Signed-off-by: Will Deacon
    Signed-off-by: Rusty Russell

    Will Deacon
     

28 Sep, 2012

1 commit

  • Instead of storing the queue index in transport-specific virtio structs,
    this patch moves them to vring_virtqueue and introduces an helper to get
    the value. This lets drivers simplify their management and tracing of
    virtqueues.

    Signed-off-by: Jason Wang
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Rusty Russell

    Jason Wang
     

28 Jan, 2012

2 commits

  • Use virtio_mb() to make sure the available index to be exposed before
    checking the the avail event. Otherwise we may get stale value of
    avail event in guest and never kick the host after.

    Note: this fixes a bug introduced by ee7cd8981e15bcb365fc762afe3fc47b8242f630.

    Signed-off-by: Jason Wang
    Acked-by: Michael S. Tsirkin
    Signed-off-by: Rusty Russell
    Cc: stable@kernel.org

    Jason Wang
     
  • Note: this fixes a bug introduced recently in
    7b21e34fd1c272e3a8c3846168f2f6287a4cd72b.

    Signed-off-by: Jason Wang
    Acked-by: Michael S. Tsirkin
    Signed-off-by: Rusty Russell

    Jason Wang
     

12 Jan, 2012

4 commits

  • Under the existing #ifdef DEBUG, check that they don't have more than
    1/10 of a second between an add_buf() and a
    virtqueue_notify()/virtqueue_kick_prepare() call.

    We could get false positives on a really busy system, but good for
    development.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • A virtio driver does virtqueue_add_buf() multiple times before finally
    calling virtqueue_kick(); previously we only exposed the added buffers
    in the virtqueue_kick() call. This means we don't need a memory
    barrier in virtqueue_add_buf(), but it reduces concurrency as the
    device (ie. host) can't see the buffers until the kick.

    In the unusual (but now possible) case where a driver does add_buf()
    and get_buf() without doing a kick, we do need to insert one before
    our counter wraps. Otherwise we could wrap num_added, and later on
    not realize that we have passed the marker where we should have
    kicked.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Since we know vq->vring.num is a power of 2, modulus is lazy (it's asserted
    in vring_new_virtqueue()).

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Based on patch by Christoph for virtio_blk speedup:

    Split virtqueue_kick to be able to do the actual notification
    outside the lock protecting the virtqueue. This patch was
    originally done by Stefan Hajnoczi, but I can't find the
    original one anymore and had to recreated it from memory.
    Pointers to the original or corrections for the commit message
    are welcome.

    Stefan's patch was here:

    https://github.com/stefanha/linux/commit/a6d06644e3a58e57a774e77d7dc34c4a5a2e7496
    http://www.spinics.net/lists/linux-virtualization/msg14616.html

    Third time's the charm!

    Signed-off-by: Rusty Russell

    Rusty Russell