30 Jan, 2013

1 commit

  • Currently, the polling errors were ignored, which can lead following issues:

    - vhost remove itself unconditionally from waitqueue when stopping the poll,
    this may crash the kernel since the previous attempt of starting may fail to
    add itself to the waitqueue
    - userspace may think the backend were successfully set even when the polling
    failed.

    Solve this by:

    - check poll->wqh before trying to remove from waitqueue
    - report polling errors in vhost_poll_start(), tx_poll_start(), the return value
    will be checked and returned when userspace want to set the backend

    After this fix, there still could be a polling failure after backend is set, it
    will addressed by the next patch.

    Signed-off-by: Jason Wang
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Jason Wang
     

06 Dec, 2012

1 commit

  • vring changes already do a flush internally where appropriate, so we do
    not need a second flush.

    It's currently not very expensive but a follow-up patch makes flush more
    heavy-weight, so remove the extra flush here to avoid regressing
    performance if call or kick fds are changed on data path.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     

30 Nov, 2012

1 commit


29 Nov, 2012

1 commit


03 Nov, 2012

4 commits


27 Sep, 2012

1 commit


22 Jul, 2012

1 commit

  • The vhost work queue allows processing to be done in vhost worker thread
    context, which uses the owner process mm. Access to the vring and guest
    memory is typically only possible from vhost worker context so it is
    useful to allow work to be queued directly by users.

    Currently vhost_net only uses the poll wrappers which do not expose the
    work queue functions. However, for tcm_vhost (vhost_scsi) it will be
    necessary to queue custom work.

    Signed-off-by: Stefan Hajnoczi
    Cc: Zhi Yong Wu
    Cc: Michael S. Tsirkin
    Cc: Paolo Bonzini
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Michael S. Tsirkin

    Stefan Hajnoczi
     

27 Jun, 2012

1 commit

  • On some architectures address spaces are set up in a way that this is
    not necessary to work properly but on some others (like s390) it is.
    Make sure we operate on the user address space to allow copy_xxx_user()
    from the vhost_worker() thread by setting it explicitly before calling
    use_mm() and revert it after unuse_mm().

    Signed-off-by: Jens Freimann
    Signed-off-by: Christian Borntraeger
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Jens Freimann
     

02 May, 2012

1 commit

  • We add used and signal guest in worker thread but did not poll the virtqueue
    during the zero copy callback. This may lead the missing of adding and
    signalling during zerocopy. Solve this by polling the virtqueue and let it
    wakeup the worker during callback.

    Signed-off-by: Jason Wang
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     

14 Apr, 2012

1 commit

  • The skb struct ubuf_info callback gets passed struct ubuf_info
    itself, not the arg value as the field name and the function signature
    seem to imply. Rename the arg field to ctx to match usage,
    add documentation and change the callback argument type
    to make usage clear and to have compiler check correctness.

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

    Michael S. Tsirkin
     

24 Mar, 2012

1 commit


20 Mar, 2012

1 commit


28 Feb, 2012

2 commits

  • We shouldn't hold any locks on release path. Pass a flag to
    vhost_dev_cleanup to use the lockdep info correctly.

    Signed-off-by: Michael S. Tsirkin
    Tested-by: Sasha Levin

    Michael S. Tsirkin
     
  • This is a tiny, but important, patch to vhost.

    Vhost's worker thread only called schedule() when it had no work to do, and
    it wanted to go to sleep. But if there's always work to do, e.g., the guest
    is running a network-intensive program like netperf with small message sizes,
    schedule() was *never* called. This had several negative implications (on
    non-preemptive kernels):

    1. Passing time was not properly accounted to the "vhost" process (ps and
    top would wrongly show it using zero CPU time).

    2. Sometimes error messages about RCU timeouts would be printed, if the
    core running the vhost thread didn't schedule() for a very long time.

    3. Worst of all, a vhost thread would "hog" the core. If several vhost
    threads need to share the same core, typically one would get most of the
    CPU time (and its associated guest most of the performance), while the
    others hardly get any work done.

    The trivial solution is to add

    if (need_resched())
    schedule();

    After doing every piece of work. This will not do the heavy schedule() all
    the time, just when the timer interrupt decided a reschedule is warranted
    (so need_resched returns true).

    Thanks to Abel Gordon for this patch.

    Signed-off-by: Nadav Har'El
    Signed-off-by: Michael S. Tsirkin

    Nadav Har'El
     

19 Jul, 2011

5 commits

  • As we now only update used ring after enabling
    the backend, we can write flags with __put_user:
    as that's done on data path, it matters.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • Fix get/put refcount imbalance with zero copy,
    which caused qemu to hang forever on guest driver unload.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • We need to log writes when updating used flags and avail event
    fields. Otherwise the guest may see a stale value after migration and
    miss notifying the host.

    Signed-off-by: Jason Wang
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     
  • Move the used ring initialization after backend was set. This
    makes it possible to disable the backend and tweak the used ring,
    then restart. This will also make it possible to log the used ring
    write correctly.

    Signed-off-by: Jason Wang
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     
  • >From: Shirley Ma

    This adds experimental zero copy support in vhost-net,
    disabled by default. To enable, set
    experimental_zcopytx module option to 1.

    This patch maintains the outstanding userspace buffers in the
    sequence it is delivered to vhost. The outstanding userspace buffers
    will be marked as done once the lower device buffers DMA has finished.
    This is monitored through last reference of kfree_skb callback. Two
    buffer indices are used for this purpose.

    The vhost-net device passes the userspace buffers info to lower device
    skb through message control. DMA done status check and guest
    notification are handled by handle_tx: in the worst case is all buffers
    in the vq are in pending/done status, so we need to notify guest to
    release DMA done buffers first before we get any new buffers from the
    vq.

    One known problem is that if the guest stops submitting
    buffers, buffers might never get used until some
    further action, e.g. device reset. This does not
    seem to affect linux guests.

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

    Michael S. Tsirkin
     

30 May, 2011

1 commit


07 May, 2011

1 commit

  • - Documentation/kvm/ to Documentation/virtual/kvm
    - Documentation/uml/ to Documentation/virtual/uml
    - Documentation/lguest/ to Documentation/virtual/lguest
    throughout the kernel source tree.

    Signed-off-by: Rob Landley
    Signed-off-by: Randy Dunlap

    Rob Landley
     

09 Mar, 2011

2 commits


10 Jan, 2011

1 commit


09 Dec, 2010

3 commits


04 Nov, 2010

4 commits


27 Oct, 2010

1 commit


24 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
    bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
    vlan: Calling vlan_hwaccel_do_receive() is always valid.
    tproxy: use the interface primary IP address as a default value for --on-ip
    tproxy: added IPv6 support to the socket match
    cxgb3: function namespace cleanup
    tproxy: added IPv6 support to the TPROXY target
    tproxy: added IPv6 socket lookup function to nf_tproxy_core
    be2net: Changes to use only priority codes allowed by f/w
    tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
    tproxy: added tproxy sockopt interface in the IPV6 layer
    tproxy: added udp6_lib_lookup function
    tproxy: added const specifiers to udp lookup functions
    tproxy: split off ipv6 defragmentation to a separate module
    l2tp: small cleanup
    nf_nat: restrict ICMP translation for embedded header
    can: mcp251x: fix generation of error frames
    can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
    can-raw: add msg_flags to distinguish local traffic
    9p: client code cleanup
    rds: make local functions/variables static
    ...

    Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
    drivers/net/wireless/ath/ath9k/debug.c as per David

    Linus Torvalds
     

21 Oct, 2010

1 commit


12 Oct, 2010

1 commit


07 Oct, 2010

2 commits